xref: /illumos-gate/usr/src/ucbcmd/Makefile (revision 5801b0f01c3c34499a929ed96164a5a68b470945)
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
22#
23# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27# ucbcmd/Makefile
28
29# include global definitions; SRC should be defined in the shell.
30# SRC is needed until RFE 1026993 is implemented.
31include $(SRC)/Makefile.master
32include $(SRC)/ucbcmd/Makefile.ucbcmd
33
34COMMON_SUBDIRS=		\
35	basename	\
36	biff		\
37	chown		\
38	df		\
39	du		\
40	echo		\
41	expr		\
42	fastboot	\
43	fasthalt	\
44	file		\
45	from		\
46	groups		\
47	install.d	\
48	ln		\
49	ls		\
50	mkstr		\
51	printenv	\
52	rusage		\
53	sed		\
54	shutdown	\
55	stty		\
56	sum		\
57	test		\
58	touch		\
59	tr		\
60	tset		\
61	users		\
62	vipw		\
63	whereis		\
64	whoami
65
66sparc_SUBDIRS= sbcp
67
68SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
69
70# commands messaged
71MSGSUBDIRS = biff install.d mkstr rusage shutdown
72
73BWOSDIRS=
74
75all:=		TARGET= all
76install:=	TARGET= install
77clean:=		TARGET= clean
78clobber:=	TARGET= clobber
79lint:=		TARGET= lint
80_msg:=          TARGET= _msg
81
82# Since pre-5.0 system users were told to put /usr/5bin in their path to
83# get the 5.0 system behavior, we need this link so that the PATH of
84# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
85# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
86# confused...)
87ROOTUSR = $(ROOT)/usr
88S5LINK = $(ROOTUSR)/5bin
89DICTLINK = $(ROOTUSR)/dict
90
91# Symbolic links for source compatibility.  Many utilities that
92# were under /usr/ucb in SunOS 4.1, are now in the base;  the
93# symbolic links are provided for compatibility.
94LINKDEST=	../bin/$(@F)
95
96BINLINKS=		\
97	arch		\
98	clear		\
99	e		\
100	edit		\
101	ex		\
102	vedit		\
103	vi		\
104	view		\
105	finger		\
106	fmt		\
107	fold		\
108	ftp		\
109	head		\
110	hostid		\
111	hostname	\
112	logger		\
113	mach		\
114	more		\
115	page		\
116	pagesize	\
117	netstat		\
118	quota		\
119	rcp		\
120	rdate		\
121	renice		\
122	rlogin		\
123	rsh		\
124	ruptime		\
125	rwho		\
126	script		\
127	tail		\
128	talk		\
129	tcopy		\
130	telnet		\
131	tftp		\
132	uptime		\
133	vacation	\
134	vmstat		\
135	w		\
136	wc		\
137	whois		\
138	xstr
139
140ROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
141
142OTHERLINKS = $(ROOTETC)/termcap \
143		$(ROOTSHLIB)/zoneinfo/posixrules
144
145$(S5LINK) :=		LINKDEST= bin
146$(DICTLINK) :=		LINKDEST= share/lib/dict
147$(ROOTBIN)/e :=		LINKDEST= ../bin/edit
148$(ROOTBIN)/ex :=	LINKDEST= ../bin/edit
149$(ROOTBIN)/page :=	LINKDEST= ../bin/more
150$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
151$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
152$(ROOTBIN)/vi :=	LINKDEST= ../bin/edit
153$(ROOTBIN)/view :=	LINKDEST= ../bin/edit
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