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