xref: /titanic_52/usr/src/ucbcmd/Makefile (revision ead1f93ee620d7580f7e53350fe5a884fc4f158a)
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#
21*ead1f93eSLiane Praza
22*ead1f93eSLiane Praza#
23*ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
26*ead1f93eSLiane 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
667c478bd9Sstevel@tonic-gatesparc_SUBDIRS= sbcp
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateSUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate# commands messaged
7124492170SJerry GilliamMSGSUBDIRS = biff install.d mkstr rusage shutdown
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateBWOSDIRS=
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateall:=		TARGET= all
767c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
777c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
787c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
797c478bd9Sstevel@tonic-gatelint:=		TARGET= lint
807c478bd9Sstevel@tonic-gate_msg:=          TARGET= _msg
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate# Since pre-5.0 system users were told to put /usr/5bin in their path to
837c478bd9Sstevel@tonic-gate# get the 5.0 system behavior, we need this link so that the PATH of
847c478bd9Sstevel@tonic-gate# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
857c478bd9Sstevel@tonic-gate# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
867c478bd9Sstevel@tonic-gate# confused...)
877c478bd9Sstevel@tonic-gateROOTUSR = $(ROOT)/usr
887c478bd9Sstevel@tonic-gateS5LINK = $(ROOTUSR)/5bin
897c478bd9Sstevel@tonic-gateDICTLINK = $(ROOTUSR)/dict
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate# Symbolic links for source compatibility.  Many utilities that
927c478bd9Sstevel@tonic-gate# were under /usr/ucb in SunOS 4.1, are now in the base;  the
937c478bd9Sstevel@tonic-gate# symbolic links are provided for compatibility.
947c478bd9Sstevel@tonic-gateLINKDEST=	../bin/$(@F)
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gateBINLINKS=		\
977c478bd9Sstevel@tonic-gate	arch		\
987c478bd9Sstevel@tonic-gate	clear		\
997c478bd9Sstevel@tonic-gate	e		\
1007c478bd9Sstevel@tonic-gate	edit		\
1017c478bd9Sstevel@tonic-gate	ex		\
1027c478bd9Sstevel@tonic-gate	vedit		\
1037c478bd9Sstevel@tonic-gate	vi		\
1047c478bd9Sstevel@tonic-gate	view		\
1057c478bd9Sstevel@tonic-gate	finger		\
1067c478bd9Sstevel@tonic-gate	fmt		\
1077c478bd9Sstevel@tonic-gate	fold		\
1087c478bd9Sstevel@tonic-gate	ftp		\
1097c478bd9Sstevel@tonic-gate	head		\
1107c478bd9Sstevel@tonic-gate	hostid		\
1117c478bd9Sstevel@tonic-gate	hostname	\
1127c478bd9Sstevel@tonic-gate	logger		\
1137c478bd9Sstevel@tonic-gate	mach		\
1147c478bd9Sstevel@tonic-gate	more		\
1157c478bd9Sstevel@tonic-gate	page		\
1167c478bd9Sstevel@tonic-gate	pagesize	\
1177c478bd9Sstevel@tonic-gate	netstat		\
1187c478bd9Sstevel@tonic-gate	quota		\
1197c478bd9Sstevel@tonic-gate	rcp		\
1207c478bd9Sstevel@tonic-gate	rdate		\
1217c478bd9Sstevel@tonic-gate	renice		\
1227c478bd9Sstevel@tonic-gate	rlogin		\
1237c478bd9Sstevel@tonic-gate	rsh		\
1247c478bd9Sstevel@tonic-gate	ruptime		\
1257c478bd9Sstevel@tonic-gate	rwho		\
1267c478bd9Sstevel@tonic-gate	script		\
1277c478bd9Sstevel@tonic-gate	tail		\
1287c478bd9Sstevel@tonic-gate	talk		\
1297c478bd9Sstevel@tonic-gate	tcopy		\
1307c478bd9Sstevel@tonic-gate	telnet		\
1317c478bd9Sstevel@tonic-gate	tftp		\
1327c478bd9Sstevel@tonic-gate	uptime		\
1337c478bd9Sstevel@tonic-gate	vacation	\
1347c478bd9Sstevel@tonic-gate	vmstat		\
1357c478bd9Sstevel@tonic-gate	w		\
1367c478bd9Sstevel@tonic-gate	wc		\
1377c478bd9Sstevel@tonic-gate	whois		\
1387c478bd9Sstevel@tonic-gate	xstr
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gateROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
1417c478bd9Sstevel@tonic-gate
1427c478bd9Sstevel@tonic-gateOTHERLINKS = $(ROOTETC)/termcap \
1437c478bd9Sstevel@tonic-gate		$(ROOTSHLIB)/zoneinfo/posixrules
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gate$(S5LINK) :=		LINKDEST= bin
1467c478bd9Sstevel@tonic-gate$(DICTLINK) :=		LINKDEST= share/lib/dict
147*ead1f93eSLiane Praza$(ROOTBIN)/e :=		LINKDEST= ../bin/edit
148*ead1f93eSLiane Praza$(ROOTBIN)/ex :=	LINKDEST= ../bin/edit
1497c478bd9Sstevel@tonic-gate$(ROOTBIN)/page :=	LINKDEST= ../bin/more
1507c478bd9Sstevel@tonic-gate$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
1517c478bd9Sstevel@tonic-gate$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
152*ead1f93eSLiane Praza$(ROOTBIN)/vi :=	LINKDEST= ../bin/edit
153*ead1f93eSLiane Praza$(ROOTBIN)/view :=	LINKDEST= ../bin/edit
1547c478bd9Sstevel@tonic-gate$(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern
1557c478bd9Sstevel@tonic-gate
1567c478bd9Sstevel@tonic-gate.KEEP_STATE:
1577c478bd9Sstevel@tonic-gate
1587c478bd9Sstevel@tonic-gate.PARALLEL:	$(SUBDIRS)
1597c478bd9Sstevel@tonic-gate
1607c478bd9Sstevel@tonic-gateall clean clobber: $(SUBDIRS)
1617c478bd9Sstevel@tonic-gate
1627c478bd9Sstevel@tonic-gateinstall: $(SUBDIRS) .WAIT rootlinks
1637c478bd9Sstevel@tonic-gate
1647c478bd9Sstevel@tonic-gate# For messaging catalog
1657c478bd9Sstevel@tonic-gate#
1667c478bd9Sstevel@tonic-gate_msg:   $(MSGSUBDIRS)
1677c478bd9Sstevel@tonic-gate
1687c478bd9Sstevel@tonic-gate
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gatebwos: $(BWOSDIRS) .WAIT $(SUBDIRS)
1717c478bd9Sstevel@tonic-gate
1727c478bd9Sstevel@tonic-gate$(BWOSDIRS) $(SUBDIRS): FRC
1737c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1747c478bd9Sstevel@tonic-gate
1757c478bd9Sstevel@tonic-gaterootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS)
1767c478bd9Sstevel@tonic-gate
1777c478bd9Sstevel@tonic-gate$(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS):
1787c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) $(LINKDEST) $@
1797c478bd9Sstevel@tonic-gate
1807c478bd9Sstevel@tonic-gateFRC:
181