xref: /illumos-gate/usr/src/ucbcmd/Makefile (revision 97b5374547d500fded52d886ceba8a9962af0527)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5f5c9e9f9SCasper H.S. Dik# Common Development and Distribution License (the "License").
6f5c9e9f9SCasper H.S. Dik# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21ead1f93eSLiane Praza
22ead1f93eSLiane Praza#
23ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
26ead1f93eSLiane Praza
277c478bd9Sstevel@tonic-gate# ucbcmd/Makefile
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate# include global definitions; SRC should be defined in the shell.
307c478bd9Sstevel@tonic-gate# SRC is needed until RFE 1026993 is implemented.
317c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master
327c478bd9Sstevel@tonic-gateinclude $(SRC)/ucbcmd/Makefile.ucbcmd
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateCOMMON_SUBDIRS=		\
357c478bd9Sstevel@tonic-gate	basename	\
367c478bd9Sstevel@tonic-gate	biff		\
377c478bd9Sstevel@tonic-gate	chown		\
387c478bd9Sstevel@tonic-gate	df		\
397c478bd9Sstevel@tonic-gate	du		\
407c478bd9Sstevel@tonic-gate	echo		\
417c478bd9Sstevel@tonic-gate	expr		\
427c478bd9Sstevel@tonic-gate	fastboot	\
437c478bd9Sstevel@tonic-gate	fasthalt	\
447c478bd9Sstevel@tonic-gate	file		\
457c478bd9Sstevel@tonic-gate	from		\
467c478bd9Sstevel@tonic-gate	groups		\
477c478bd9Sstevel@tonic-gate	install.d	\
487c478bd9Sstevel@tonic-gate	ln		\
497c478bd9Sstevel@tonic-gate	ls		\
507c478bd9Sstevel@tonic-gate	mkstr		\
517c478bd9Sstevel@tonic-gate	printenv	\
527c478bd9Sstevel@tonic-gate	rusage		\
537c478bd9Sstevel@tonic-gate	sed		\
547c478bd9Sstevel@tonic-gate	shutdown	\
557c478bd9Sstevel@tonic-gate	stty		\
567c478bd9Sstevel@tonic-gate	sum		\
577c478bd9Sstevel@tonic-gate	test		\
587c478bd9Sstevel@tonic-gate	touch		\
597c478bd9Sstevel@tonic-gate	tr		\
607c478bd9Sstevel@tonic-gate	tset		\
617c478bd9Sstevel@tonic-gate	users		\
627c478bd9Sstevel@tonic-gate	vipw		\
637c478bd9Sstevel@tonic-gate	whereis		\
647c478bd9Sstevel@tonic-gate	whoami
657c478bd9Sstevel@tonic-gate
66*97b53745SToomas SoomeSUBDIRS= $(COMMON_SUBDIRS)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate# commands messaged
6924492170SJerry GilliamMSGSUBDIRS = biff install.d mkstr rusage shutdown
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateall:=		TARGET= all
727c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
737c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
747c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
757c478bd9Sstevel@tonic-gate_msg:=          TARGET= _msg
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate# Since pre-5.0 system users were told to put /usr/5bin in their path to
787c478bd9Sstevel@tonic-gate# get the 5.0 system behavior, we need this link so that the PATH of
797c478bd9Sstevel@tonic-gate# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
807c478bd9Sstevel@tonic-gate# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
817c478bd9Sstevel@tonic-gate# confused...)
827c478bd9Sstevel@tonic-gateROOTUSR = $(ROOT)/usr
837c478bd9Sstevel@tonic-gateS5LINK = $(ROOTUSR)/5bin
847c478bd9Sstevel@tonic-gateDICTLINK = $(ROOTUSR)/dict
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate# Symbolic links for source compatibility.  Many utilities that
877c478bd9Sstevel@tonic-gate# were under /usr/ucb in SunOS 4.1, are now in the base;  the
887c478bd9Sstevel@tonic-gate# symbolic links are provided for compatibility.
897c478bd9Sstevel@tonic-gateLINKDEST=	../bin/$(@F)
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gateBINLINKS=		\
927c478bd9Sstevel@tonic-gate	arch		\
937c478bd9Sstevel@tonic-gate	clear		\
947c478bd9Sstevel@tonic-gate	e		\
957c478bd9Sstevel@tonic-gate	edit		\
967c478bd9Sstevel@tonic-gate	ex		\
977c478bd9Sstevel@tonic-gate	vedit		\
987c478bd9Sstevel@tonic-gate	vi		\
997c478bd9Sstevel@tonic-gate	view		\
1007c478bd9Sstevel@tonic-gate	finger		\
1017c478bd9Sstevel@tonic-gate	fmt		\
1027c478bd9Sstevel@tonic-gate	fold		\
1037c478bd9Sstevel@tonic-gate	ftp		\
1047c478bd9Sstevel@tonic-gate	head		\
1057c478bd9Sstevel@tonic-gate	hostid		\
1067c478bd9Sstevel@tonic-gate	hostname	\
1077c478bd9Sstevel@tonic-gate	logger		\
1087c478bd9Sstevel@tonic-gate	mach		\
1097c478bd9Sstevel@tonic-gate	more		\
1107c478bd9Sstevel@tonic-gate	page		\
1117c478bd9Sstevel@tonic-gate	pagesize	\
1127c478bd9Sstevel@tonic-gate	netstat		\
1137c478bd9Sstevel@tonic-gate	quota		\
1147c478bd9Sstevel@tonic-gate	rcp		\
1157c478bd9Sstevel@tonic-gate	rdate		\
1167c478bd9Sstevel@tonic-gate	renice		\
1177c478bd9Sstevel@tonic-gate	rlogin		\
1187c478bd9Sstevel@tonic-gate	rsh		\
1197c478bd9Sstevel@tonic-gate	ruptime		\
1207c478bd9Sstevel@tonic-gate	rwho		\
1217c478bd9Sstevel@tonic-gate	script		\
1227c478bd9Sstevel@tonic-gate	tail		\
1237c478bd9Sstevel@tonic-gate	talk		\
1247c478bd9Sstevel@tonic-gate	tcopy		\
1257c478bd9Sstevel@tonic-gate	telnet		\
1267c478bd9Sstevel@tonic-gate	tftp		\
1277c478bd9Sstevel@tonic-gate	uptime		\
1287c478bd9Sstevel@tonic-gate	vacation	\
1297c478bd9Sstevel@tonic-gate	vmstat		\
1307c478bd9Sstevel@tonic-gate	w		\
1317c478bd9Sstevel@tonic-gate	wc		\
1327c478bd9Sstevel@tonic-gate	whois		\
1337c478bd9Sstevel@tonic-gate	xstr
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gateROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
1367c478bd9Sstevel@tonic-gate
1377c478bd9Sstevel@tonic-gateOTHERLINKS = $(ROOTETC)/termcap \
1387c478bd9Sstevel@tonic-gate		$(ROOTSHLIB)/zoneinfo/posixrules
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gate$(S5LINK) :=		LINKDEST= bin
1417c478bd9Sstevel@tonic-gate$(DICTLINK) :=		LINKDEST= share/lib/dict
142ead1f93eSLiane Praza$(ROOTBIN)/e :=		LINKDEST= ../bin/edit
143ead1f93eSLiane Praza$(ROOTBIN)/ex :=	LINKDEST= ../bin/edit
1447c478bd9Sstevel@tonic-gate$(ROOTBIN)/page :=	LINKDEST= ../bin/more
1457c478bd9Sstevel@tonic-gate$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
1467c478bd9Sstevel@tonic-gate$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
147ead1f93eSLiane Praza$(ROOTBIN)/vi :=	LINKDEST= ../bin/edit
148ead1f93eSLiane Praza$(ROOTBIN)/view :=	LINKDEST= ../bin/edit
1497c478bd9Sstevel@tonic-gate$(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gate.KEEP_STATE:
1527c478bd9Sstevel@tonic-gate
1537c478bd9Sstevel@tonic-gate.PARALLEL:	$(SUBDIRS)
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gateall clean clobber: $(SUBDIRS)
1567c478bd9Sstevel@tonic-gate
1577c478bd9Sstevel@tonic-gateinstall: $(SUBDIRS) .WAIT rootlinks
1587c478bd9Sstevel@tonic-gate
1597c478bd9Sstevel@tonic-gate# For messaging catalog
1607c478bd9Sstevel@tonic-gate#
1617c478bd9Sstevel@tonic-gate_msg:   $(MSGSUBDIRS)
1627c478bd9Sstevel@tonic-gate
163*97b53745SToomas Soome$(SUBDIRS): FRC
1647c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1657c478bd9Sstevel@tonic-gate
1667c478bd9Sstevel@tonic-gaterootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS)
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gate$(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS):
1697c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) $(LINKDEST) $@
1707c478bd9Sstevel@tonic-gate
1717c478bd9Sstevel@tonic-gateFRC:
172