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