blob: 584f4763aa9a59445efe6fc16ad4f92c0f1c4f04 [file] [log] [blame]
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07001#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
Casper H.S. Dikf5c9e9f2009-02-14 08:36:49 +01005# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07007#
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#
Liane Prazaead1f932010-03-02 19:29:26 -070021
22#
23# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070024# Use is subject to license terms.
25#
Liane Prazaead1f932010-03-02 19:29:26 -070026
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070027# ucbcmd/Makefile
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070028
29# include global definitions; SRC should be defined in the shell.
30# SRC is needed until RFE 1026993 is implemented.
31include $(SRC)/Makefile.master
32include $(SRC)/ucbcmd/Makefile.ucbcmd
33
34COMMON_SUBDIRS= \
35 basename \
36 biff \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070037 chown \
38 df \
39 du \
40 echo \
41 expr \
42 fastboot \
43 fasthalt \
44 file \
45 from \
46 groups \
47 install.d \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070048 ln \
49 ls \
50 mkstr \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070051 printenv \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070052 rusage \
53 sed \
54 shutdown \
55 stty \
56 sum \
57 test \
58 touch \
59 tr \
60 tset \
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070061 users \
62 vipw \
63 whereis \
64 whoami
65
66sparc_SUBDIRS= sbcp
67
68SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
69
70# commands messaged
Jerry Gilliam24492172009-07-13 19:06:47 -070071MSGSUBDIRS = biff install.d mkstr rusage shutdown
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070072
73BWOSDIRS=
74
75all:= TARGET= all
76install:= TARGET= install
77clean:= TARGET= clean
78clobber:= TARGET= clobber
79lint:= TARGET= lint
80_msg:= TARGET= _msg
81
82# Since pre-5.0 system users were told to put /usr/5bin in their path to
83# get the 5.0 system behavior, we need this link so that the PATH of
84# /usr/5bin:/usr/ucb:/usr/bin does the right thing. (let's see, without
85# this link, 5.0 behaves like UCB and 4.1 behaves like SysV... I'm so
86# confused...)
87ROOTUSR = $(ROOT)/usr
88S5LINK = $(ROOTUSR)/5bin
89DICTLINK = $(ROOTUSR)/dict
90
91# Symbolic links for source compatibility. Many utilities that
92# were under /usr/ucb in SunOS 4.1, are now in the base; the
93# symbolic links are provided for compatibility.
94LINKDEST= ../bin/$(@F)
95
96BINLINKS= \
97 arch \
98 clear \
99 e \
100 edit \
101 ex \
102 vedit \
103 vi \
104 view \
105 finger \
106 fmt \
107 fold \
108 ftp \
109 head \
110 hostid \
111 hostname \
112 logger \
113 mach \
114 more \
115 page \
116 pagesize \
117 netstat \
118 quota \
119 rcp \
120 rdate \
121 renice \
122 rlogin \
123 rsh \
124 ruptime \
125 rwho \
126 script \
127 tail \
128 talk \
129 tcopy \
130 telnet \
131 tftp \
132 uptime \
133 vacation \
134 vmstat \
135 w \
136 wc \
137 whois \
138 xstr
139
140ROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%)
141
142OTHERLINKS = $(ROOTETC)/termcap \
143 $(ROOTSHLIB)/zoneinfo/posixrules
144
145$(S5LINK) := LINKDEST= bin
146$(DICTLINK) := LINKDEST= share/lib/dict
Liane Prazaead1f932010-03-02 19:29:26 -0700147$(ROOTBIN)/e := LINKDEST= ../bin/edit
148$(ROOTBIN)/ex := LINKDEST= ../bin/edit
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700149$(ROOTBIN)/page := LINKDEST= ../bin/more
150$(ROOTBIN)/quota := LINKDEST= ../lib/fs/ufs/quota
151$(ROOTETC)/termcap := LINKDEST= ../usr/share/lib/termcap
Liane Prazaead1f932010-03-02 19:29:26 -0700152$(ROOTBIN)/vi := LINKDEST= ../bin/edit
153$(ROOTBIN)/view := LINKDEST= ../bin/edit
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -0700154$(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern
155
156.KEEP_STATE:
157
158.PARALLEL: $(SUBDIRS)
159
160all clean clobber: $(SUBDIRS)
161
162install: $(SUBDIRS) .WAIT rootlinks
163
164# For messaging catalog
165#
166_msg: $(MSGSUBDIRS)
167
168
169
170bwos: $(BWOSDIRS) .WAIT $(SUBDIRS)
171
172$(BWOSDIRS) $(SUBDIRS): FRC
173 @cd $@; pwd; $(MAKE) $(TARGET)
174
175rootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS)
176
177$(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS):
178 $(RM) $@; $(SYMLINK) $(LINKDEST) $@
179
180FRC: