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