xref: /titanic_51/usr/src/ucbcmd/Makefile (revision 2ef50f010f7a3a07eb5a9f6001b9843fd868e26b)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# ucbcmd/Makefile
25#
26
27# include global definitions; SRC should be defined in the shell.
28# SRC is needed until RFE 1026993 is implemented.
29include $(SRC)/Makefile.master
30include $(SRC)/ucbcmd/Makefile.ucbcmd
31
32COMMON_SUBDIRS=		\
33	basename	\
34	biff		\
35	cc		\
36	chown		\
37	df		\
38	du		\
39	echo		\
40	expr		\
41	fastboot	\
42	fasthalt	\
43	file		\
44	from		\
45	groups		\
46	install.d	\
47	ld		\
48	lint.d		\
49	ln		\
50	ls		\
51	mkstr		\
52	plot		\
53	printenv	\
54	rusage		\
55	sed		\
56	shutdown	\
57	stty		\
58	sum		\
59	test		\
60	touch		\
61	tr		\
62	tset		\
63	users		\
64	vipw		\
65	whereis		\
66	whoami
67
68sparc_SUBDIRS= sbcp
69
70SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
71
72# commands messaged
73MSGSUBDIRS = biff install.d mkstr rusage shutdown
74
75BWOSDIRS=
76
77all:=		TARGET= all
78install:=	TARGET= install
79clean:=		TARGET= clean
80clobber:=	TARGET= clobber
81lint:=		TARGET= lint
82_msg:=          TARGET= _msg
83
84# Since pre-5.0 system users were told to put /usr/5bin in their path to
85# get the 5.0 system behavior, we need this link so that the PATH of
86# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
87# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
88# confused...)
89ROOTUSR = $(ROOT)/usr
90S5LINK = $(ROOTUSR)/5bin
91DICTLINK = $(ROOTUSR)/dict
92
93# Symbolic links for source compatibility.  Many utilities that
94# were under /usr/ucb in SunOS 4.1, are now in the base;  the
95# symbolic links are provided for compatibility.
96LINKDEST=	../bin/$(@F)
97
98BINLINKS=		\
99	arch		\
100	clear		\
101	e		\
102	edit		\
103	ex		\
104	vedit		\
105	vi		\
106	view		\
107	finger		\
108	fmt		\
109	fold		\
110	ftp		\
111	head		\
112	hostid		\
113	hostname	\
114	logger		\
115	mach		\
116	more		\
117	page		\
118	pagesize	\
119	netstat		\
120	quota		\
121	rcp		\
122	rdate		\
123	renice		\
124	rlogin		\
125	rsh		\
126	ruptime		\
127	rwho		\
128	script		\
129	tail		\
130	talk		\
131	tcopy		\
132	telnet		\
133	tftp		\
134	uptime		\
135	vacation	\
136	vmstat		\
137	w		\
138	wc		\
139	whois		\
140	xstr
141
142ROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
143
144OTHERLINKS = $(ROOTETC)/termcap \
145		$(ROOTSHLIB)/zoneinfo/posixrules
146
147$(S5LINK) :=		LINKDEST= bin
148$(DICTLINK) :=		LINKDEST= share/lib/dict
149$(ROOTBIN)/e :=		LINKDEST= ../bin/ex
150$(ROOTBIN)/page :=	LINKDEST= ../bin/more
151$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
152$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
153$(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern
154
155.KEEP_STATE:
156
157.PARALLEL:	$(SUBDIRS)
158
159all clean clobber: $(SUBDIRS)
160
161install: $(SUBDIRS) .WAIT rootlinks
162
163# For messaging catalog
164#
165_msg:   $(MSGSUBDIRS)
166
167
168
169bwos: $(BWOSDIRS) .WAIT $(SUBDIRS)
170
171$(BWOSDIRS) $(SUBDIRS): FRC
172	@cd $@; pwd; $(MAKE) $(TARGET)
173
174rootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS)
175
176$(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS):
177	$(RM) $@; $(SYMLINK) $(LINKDEST) $@
178
179FRC:
180