xref: /titanic_51/usr/src/ucbcmd/Makefile (revision 1bdd6c0e3710e91cb1f31aa78de33cb638494480)
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	ucblinks	\
64	users		\
65	vipw		\
66	whereis		\
67	whoami
68
69sparc_SUBDIRS= sbcp
70
71SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
72
73# commands messaged
74MSGSUBDIRS = biff install.d mkstr rusage shutdown ucblinks
75
76BWOSDIRS=
77
78all:=		TARGET= all
79install:=	TARGET= install
80clean:=		TARGET= clean
81clobber:=	TARGET= clobber
82lint:=		TARGET= lint
83_msg:=          TARGET= _msg
84
85# Since pre-5.0 system users were told to put /usr/5bin in their path to
86# get the 5.0 system behavior, we need this link so that the PATH of
87# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
88# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
89# confused...)
90ROOTUSR = $(ROOT)/usr
91S5LINK = $(ROOTUSR)/5bin
92DICTLINK = $(ROOTUSR)/dict
93
94# Symbolic links for source compatibility.  Many utilities that
95# were under /usr/ucb in SunOS 4.1, are now in the base;  the
96# symbolic links are provided for compatibility.
97LINKDEST=	../bin/$(@F)
98
99BINLINKS=		\
100	arch		\
101	clear		\
102	e		\
103	edit		\
104	ex		\
105	vedit		\
106	vi		\
107	view		\
108	finger		\
109	fmt		\
110	fold		\
111	ftp		\
112	head		\
113	hostid		\
114	hostname	\
115	logger		\
116	mach		\
117	more		\
118	page		\
119	pagesize	\
120	netstat		\
121	quota		\
122	rcp		\
123	rdate		\
124	renice		\
125	rlogin		\
126	rsh		\
127	ruptime		\
128	rwho		\
129	script		\
130	tail		\
131	talk		\
132	tcopy		\
133	telnet		\
134	tftp		\
135	uptime		\
136	vacation	\
137	vmstat		\
138	w		\
139	wc		\
140	whois		\
141	xstr
142
143ROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
144
145OTHERLINKS = $(ROOTETC)/termcap \
146		$(ROOTSHLIB)/zoneinfo/posixrules
147
148$(S5LINK) :=		LINKDEST= bin
149$(DICTLINK) :=		LINKDEST= share/lib/dict
150$(ROOTBIN)/e :=		LINKDEST= ../bin/ex
151$(ROOTBIN)/page :=	LINKDEST= ../bin/more
152$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
153$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
154$(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern
155
156.KEEP_STATE:
157
158.PARALLEL:	$(SUBDIRS)
159
160all clean clobber: $(SUBDIRS)
161
162install: $(SUBDIRS) .WAIT rootlinks
163
164# For messaging catalog
165#
166_msg:   $(MSGSUBDIRS)
167
168
169
170bwos: $(BWOSDIRS) .WAIT $(SUBDIRS)
171
172$(BWOSDIRS) $(SUBDIRS): FRC
173	@cd $@; pwd; $(MAKE) $(TARGET)
174
175rootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS)
176
177$(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS):
178	$(RM) $@; $(SYMLINK) $(LINKDEST) $@
179
180FRC:
181