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