1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 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 # 21 22 # 23 # Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 27 # ucbcmd/Makefile 28 29 # include global definitions; SRC should be defined in the shell. 30 # SRC is needed until RFE 1026993 is implemented. 31 include $(SRC)/Makefile.master 32 include $(SRC)/ucbcmd/Makefile.ucbcmd 33 34 COMMON_SUBDIRS= \ 35 basename \ 36 biff \ 37 chown \ 38 df \ 39 du \ 40 echo \ 41 expr \ 42 fastboot \ 43 fasthalt \ 44 file \ 45 from \ 46 groups \ 47 install.d \ 48 ln \ 49 ls \ 50 mkstr \ 51 printenv \ 52 rusage \ 53 sed \ 54 shutdown \ 55 stty \ 56 sum \ 57 test \ 58 touch \ 59 tr \ 60 tset \ 61 users \ 62 vipw \ 63 whereis \ 64 whoami 65 66 sparc_SUBDIRS= sbcp 67 68 SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS) 69 70 # commands messaged 71 MSGSUBDIRS = biff install.d mkstr rusage shutdown 72 73 BWOSDIRS= 74 75 all:= TARGET= all 76 install:= TARGET= install 77 clean:= TARGET= clean 78 clobber:= TARGET= clobber 79 lint:= 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...) 87 ROOTUSR = $(ROOT)/usr 88 S5LINK = $(ROOTUSR)/5bin 89 DICTLINK = $(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. 94 LINKDEST= ../bin/$(@F) 95 96 BINLINKS= \ 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 script \ 125 tail \ 126 talk \ 127 tcopy \ 128 telnet \ 129 tftp \ 130 uptime \ 131 vacation \ 132 vmstat \ 133 w \ 134 wc \ 135 whois \ 136 xstr 137 138 ROOTBINLINKS = $(BINLINKS:%=$(ROOTBIN)/%) 139 140 OTHERLINKS = $(ROOTETC)/termcap \ 141 $(ROOTSHLIB)/zoneinfo/posixrules 142 143 $(S5LINK) := LINKDEST= bin 144 $(DICTLINK) := LINKDEST= share/lib/dict 145 $(ROOTBIN)/e := LINKDEST= ../bin/edit 146 $(ROOTBIN)/ex := LINKDEST= ../bin/edit 147 $(ROOTBIN)/page := LINKDEST= ../bin/more 148 $(ROOTBIN)/quota := LINKDEST= ../lib/fs/ufs/quota 149 $(ROOTETC)/termcap := LINKDEST= ../usr/share/lib/termcap 150 $(ROOTBIN)/vi := LINKDEST= ../bin/edit 151 $(ROOTBIN)/view := LINKDEST= ../bin/edit 152 $(ROOTSHLIB)/zoneinfo/posixrules := LINKDEST= US/Eastern 153 154 .KEEP_STATE: 155 156 .PARALLEL: $(SUBDIRS) 157 158 all clean clobber: $(SUBDIRS) 159 160 install: $(SUBDIRS) .WAIT rootlinks 161 162 # For messaging catalog 163 # 164 _msg: $(MSGSUBDIRS) 165 166 167 168 bwos: $(BWOSDIRS) .WAIT $(SUBDIRS) 169 170 $(BWOSDIRS) $(SUBDIRS): FRC 171 @cd $@; pwd; $(MAKE) $(TARGET) 172 173 rootlinks: $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS) 174 175 $(S5LINK) $(DICTLINK) $(ROOTBINLINKS) $(OTHERLINKS): 176 $(RM) $@; $(SYMLINK) $(LINKDEST) $@ 177 178 FRC: