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