xref: /illumos-gate/usr/src/ucbcmd/Makefile (revision f5c9e9f9ca94d949afcf832822366734d6daf6ea)
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
5*f5c9e9f9SCasper H.S. Dik# Common Development and Distribution License (the "License").
6*f5c9e9f9SCasper 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*f5c9e9f9SCasper H.S. Dik# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
227c478bd9Sstevel@tonic-gate# Use is subject to license terms.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# ucbcmd/Makefile
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate# include global definitions; SRC should be defined in the shell.
287c478bd9Sstevel@tonic-gate# SRC is needed until RFE 1026993 is implemented.
297c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master
307c478bd9Sstevel@tonic-gateinclude $(SRC)/ucbcmd/Makefile.ucbcmd
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateCOMMON_SUBDIRS=		\
337c478bd9Sstevel@tonic-gate	basename	\
347c478bd9Sstevel@tonic-gate	biff		\
357c478bd9Sstevel@tonic-gate	cc		\
367c478bd9Sstevel@tonic-gate	chown		\
377c478bd9Sstevel@tonic-gate	df		\
387c478bd9Sstevel@tonic-gate	du		\
397c478bd9Sstevel@tonic-gate	echo		\
407c478bd9Sstevel@tonic-gate	expr		\
417c478bd9Sstevel@tonic-gate	fastboot	\
427c478bd9Sstevel@tonic-gate	fasthalt	\
437c478bd9Sstevel@tonic-gate	file		\
447c478bd9Sstevel@tonic-gate	from		\
457c478bd9Sstevel@tonic-gate	groups		\
467c478bd9Sstevel@tonic-gate	install.d	\
477c478bd9Sstevel@tonic-gate	ld		\
487c478bd9Sstevel@tonic-gate	lint.d		\
497c478bd9Sstevel@tonic-gate	ln		\
507c478bd9Sstevel@tonic-gate	ls		\
517c478bd9Sstevel@tonic-gate	mkstr		\
527c478bd9Sstevel@tonic-gate	plot		\
537c478bd9Sstevel@tonic-gate	printenv	\
547c478bd9Sstevel@tonic-gate	rusage		\
557c478bd9Sstevel@tonic-gate	sed		\
567c478bd9Sstevel@tonic-gate	shutdown	\
577c478bd9Sstevel@tonic-gate	stty		\
587c478bd9Sstevel@tonic-gate	sum		\
597c478bd9Sstevel@tonic-gate	test		\
607c478bd9Sstevel@tonic-gate	touch		\
617c478bd9Sstevel@tonic-gate	tr		\
627c478bd9Sstevel@tonic-gate	tset		\
637c478bd9Sstevel@tonic-gate	ucblinks	\
647c478bd9Sstevel@tonic-gate	users		\
657c478bd9Sstevel@tonic-gate	vipw		\
667c478bd9Sstevel@tonic-gate	whereis		\
677c478bd9Sstevel@tonic-gate	whoami
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gatesparc_SUBDIRS= sbcp
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateSUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gate# commands messaged
747c478bd9Sstevel@tonic-gateMSGSUBDIRS = biff install.d mkstr rusage shutdown ucblinks
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateBWOSDIRS=
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateall:=		TARGET= all
797c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
807c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
817c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
827c478bd9Sstevel@tonic-gatelint:=		TARGET= lint
837c478bd9Sstevel@tonic-gate_msg:=          TARGET= _msg
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate# Since pre-5.0 system users were told to put /usr/5bin in their path to
867c478bd9Sstevel@tonic-gate# get the 5.0 system behavior, we need this link so that the PATH of
877c478bd9Sstevel@tonic-gate# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
887c478bd9Sstevel@tonic-gate# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
897c478bd9Sstevel@tonic-gate# confused...)
907c478bd9Sstevel@tonic-gateROOTUSR = $(ROOT)/usr
917c478bd9Sstevel@tonic-gateS5LINK = $(ROOTUSR)/5bin
927c478bd9Sstevel@tonic-gateDICTLINK = $(ROOTUSR)/dict
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gate# Symbolic links for source compatibility.  Many utilities that
957c478bd9Sstevel@tonic-gate# were under /usr/ucb in SunOS 4.1, are now in the base;  the
967c478bd9Sstevel@tonic-gate# symbolic links are provided for compatibility.
977c478bd9Sstevel@tonic-gateLINKDEST=	../bin/$(@F)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateBINLINKS=		\
1007c478bd9Sstevel@tonic-gate	arch		\
1017c478bd9Sstevel@tonic-gate	clear		\
1027c478bd9Sstevel@tonic-gate	e		\
1037c478bd9Sstevel@tonic-gate	edit		\
1047c478bd9Sstevel@tonic-gate	ex		\
1057c478bd9Sstevel@tonic-gate	vedit		\
1067c478bd9Sstevel@tonic-gate	vi		\
1077c478bd9Sstevel@tonic-gate	view		\
1087c478bd9Sstevel@tonic-gate	finger		\
1097c478bd9Sstevel@tonic-gate	fmt		\
1107c478bd9Sstevel@tonic-gate	fold		\
1117c478bd9Sstevel@tonic-gate	ftp		\
1127c478bd9Sstevel@tonic-gate	head		\
1137c478bd9Sstevel@tonic-gate	hostid		\
1147c478bd9Sstevel@tonic-gate	hostname	\
1157c478bd9Sstevel@tonic-gate	logger		\
1167c478bd9Sstevel@tonic-gate	mach		\
1177c478bd9Sstevel@tonic-gate	more		\
1187c478bd9Sstevel@tonic-gate	page		\
1197c478bd9Sstevel@tonic-gate	pagesize	\
1207c478bd9Sstevel@tonic-gate	netstat		\
1217c478bd9Sstevel@tonic-gate	quota		\
1227c478bd9Sstevel@tonic-gate	rcp		\
1237c478bd9Sstevel@tonic-gate	rdate		\
1247c478bd9Sstevel@tonic-gate	renice		\
1257c478bd9Sstevel@tonic-gate	rlogin		\
1267c478bd9Sstevel@tonic-gate	rsh		\
1277c478bd9Sstevel@tonic-gate	ruptime		\
1287c478bd9Sstevel@tonic-gate	rwho		\
1297c478bd9Sstevel@tonic-gate	script		\
1307c478bd9Sstevel@tonic-gate	tail		\
1317c478bd9Sstevel@tonic-gate	talk		\
1327c478bd9Sstevel@tonic-gate	tcopy		\
1337c478bd9Sstevel@tonic-gate	telnet		\
1347c478bd9Sstevel@tonic-gate	tftp		\
1357c478bd9Sstevel@tonic-gate	uptime		\
1367c478bd9Sstevel@tonic-gate	vacation	\
1377c478bd9Sstevel@tonic-gate	vmstat		\
1387c478bd9Sstevel@tonic-gate	w		\
1397c478bd9Sstevel@tonic-gate	wc		\
1407c478bd9Sstevel@tonic-gate	whois		\
1417c478bd9Sstevel@tonic-gate	xstr
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gateROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gateOTHERLINKS = $(ROOTETC)/termcap \
1467c478bd9Sstevel@tonic-gate		$(ROOTSHLIB)/zoneinfo/posixrules
1477c478bd9Sstevel@tonic-gate
1487c478bd9Sstevel@tonic-gate$(S5LINK) :=		LINKDEST= bin
1497c478bd9Sstevel@tonic-gate$(DICTLINK) :=		LINKDEST= share/lib/dict
1507c478bd9Sstevel@tonic-gate$(ROOTBIN)/e :=		LINKDEST= ../bin/ex
1517c478bd9Sstevel@tonic-gate$(ROOTBIN)/page :=	LINKDEST= ../bin/more
1527c478bd9Sstevel@tonic-gate$(ROOTBIN)/quota :=	LINKDEST= ../lib/fs/ufs/quota
1537c478bd9Sstevel@tonic-gate$(ROOTETC)/termcap :=	LINKDEST= ../usr/share/lib/termcap
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