38 need replacement for tr
[illumos-gate.git] / usr / src / cmd / Makefile
blob785f77f1d6fbfaea38a3f02db68ff1128b528b9b
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 include ../Makefile.master
27 # Note that the commands 'agents', 'lp', 'perl', and 'man' are first in
28 # the list, violating alphabetical order. This is because they are very
29 # long-running and should be given the most wall-clock time for a
30 # parallel build.
32 # Commands in the FIRST_SUBDIRS list are built before starting the build
33 # of other commands. Currently this includes only 'isaexec' and
34 # 'platexec'. This is necessary because $(ROOT)/usr/lib/isaexec or
35 # $(ROOT)/usr/lib/platexec must exist when some other commands are built
36 # because their 'make install' creates a hard link to one of them.
38 # Commands are listed one per line so that TeamWare can auto-merge most
39 # changes.
42 FIRST_SUBDIRS= \
43 isaexec \
44 platexec
46 COMMON_SUBDIRS= \
47 agents \
48 availdevs \
49 lp \
50 perl \
51 man \
52 Adm \
53 abi \
54 adbgen \
55 acct \
56 acctadm \
57 arch \
58 asa \
59 ast \
60 audio \
61 auths \
62 autopush \
63 avs \
64 awk \
65 awk_xpg4 \
66 backup \
67 banner \
68 bart \
69 basename \
70 bc \
71 bdiff \
72 bfs \
73 bnu \
74 boot \
75 busstat \
76 cal \
77 calendar \
78 captoinfo \
79 cat \
80 cdrw \
81 cfgadm \
82 checkeq \
83 checknr \
84 chgrp \
85 chmod \
86 chown \
87 chroot \
88 clear \
89 clinfo \
90 cmd-crypto \
91 cmd-inet \
92 col \
93 compress \
94 consadm \
95 coreadm \
96 cpio \
97 cpc \
98 cron \
99 crypt \
100 csh \
101 csplit \
102 ctrun \
103 ctstat \
104 ctwatch \
105 datadm \
106 date \
107 dc \
108 dd \
109 deroff \
110 des \
111 devfsadm \
112 syseventd \
113 devctl \
114 devinfo \
115 devmgmt \
116 devprop \
117 dfs.cmds \
118 diff \
119 diff3 \
120 diffmk \
121 dircmp \
122 dirname \
123 dis \
124 diskmgtd \
125 dispadmin \
126 dladm \
127 dlstat \
128 dmesg \
129 dodatadm \
130 dtrace \
131 du \
132 dumpadm \
133 dumpcs \
134 echo \
135 ed \
136 eeprom \
137 egrep \
138 eject \
139 emul64ioctl \
140 enhance \
141 env \
142 eqn \
143 expand \
144 expr \
145 exstr \
146 factor \
147 false \
148 fcinfo \
149 fcoesvc \
150 fdetach \
151 fdformat \
152 fdisk \
153 filesync \
154 fgrep \
155 file \
156 filebench \
157 find \
158 flowadm \
159 flowstat \
160 fm \
161 fmt \
162 fmthard \
163 fmtmsg \
164 fold \
165 format \
166 fs.d \
167 fstyp \
168 fuser \
169 fwflash \
170 gcore \
171 gencat \
172 geniconvtbl \
173 genmsg \
174 getconf \
175 getdevpolicy \
176 getent \
177 getfacl \
178 getmajor \
179 getopt \
180 gettext \
181 gettxt \
182 grep \
183 grep_xpg4 \
184 groups \
185 grpck \
186 gss \
187 hal \
188 halt \
189 head \
190 hostid \
191 hostname \
192 hotplug \
193 hotplugd \
194 hwdata \
195 ibd_upgrade \
196 id \
197 idmap \
198 infocmp \
199 init \
200 initpkg \
201 install.d \
202 intrd \
203 intrstat \
204 ipcrm \
205 ipcs \
206 ipf \
207 isainfo \
208 isalist \
209 itutools \
210 iscsiadm \
211 iscsid \
212 iscsitsvc \
213 isns \
214 itadm \
215 java \
216 kbd \
217 keyserv \
218 killall \
219 krb5 \
220 ksh \
221 kstat \
222 last \
223 lastcomm \
224 latencytop \
225 ldap \
226 ldapcachemgr \
227 lgrpinfo \
228 line \
229 link \
230 dlmgmtd \
231 listen \
232 loadkeys \
233 locale \
234 lockstat \
235 locator \
236 lofiadm \
237 logadm \
238 logger \
239 login \
240 logins \
241 look \
242 ls \
243 luxadm \
244 lvm \
245 mach \
246 machid \
247 mail \
248 mailx \
249 makekey \
250 mdb \
251 mesg \
252 mkdir \
253 mkfifo \
254 mkfile \
255 mkmsgs \
256 mknod \
257 mkpwdict \
258 mktemp \
259 modload \
260 more \
261 mpathadm \
262 msgfmt \
263 msgid \
264 mt \
265 mv \
266 mvdir \
267 ndmpadm \
268 ndmpd \
269 ndmpstat \
270 netadm \
271 netfiles \
272 newform \
273 newgrp \
274 news \
275 newtask \
276 nice \
277 nl \
278 nlsadmin \
279 nohup \
280 nsadmin \
281 nscd \
282 oamuser \
283 oawk \
284 pack \
285 pagesize \
286 passmgmt \
287 passwd \
288 pathchk \
289 pbind \
290 pcidr \
291 pcitool \
292 pfexec \
293 pfexecd \
294 pgrep \
295 picl \
296 plimit \
297 policykit \
298 pools \
299 power \
300 powertop \
301 ppgsz \
302 pg \
303 plockstat \
304 pr \
305 prctl \
306 print \
307 priocntl \
308 profiles \
309 projadd \
310 projects \
311 prstat \
312 prtconf \
313 prtdiag \
314 prtvtoc \
315 ps \
316 psradm \
317 psrinfo \
318 psrset \
319 ptools \
320 pwck \
321 pwconv \
322 pwd \
323 pyzfs \
324 raidctl \
325 ramdiskadm \
326 rcap \
327 rcm_daemon \
328 rctladm \
329 refer \
330 regcmp \
331 renice \
332 rexd \
333 rm \
334 rmdir \
335 rmformat \
336 rmmount \
337 rmt \
338 rmvolmgr \
339 roles \
340 rpcbind \
341 rpcgen \
342 rpcinfo \
343 rpcsvc \
344 runat \
345 sa \
346 saf \
347 sasinfo \
348 savecore \
349 sbdadm \
350 script \
351 scsi \
352 sdiff \
353 sdpadm \
354 sendmail \
355 setfacl \
356 setmnt \
357 setpgrp \
358 setuname \
359 sgs \
360 sh \
361 shcomp \
362 smbios \
363 smbsrv \
364 smserverd \
365 soelim \
366 sort \
367 spell \
368 split \
369 sqlite \
370 srchtxt \
371 srptadm \
372 srptsvc \
373 ssh \
374 stat \
375 stmfadm \
376 stmfproxy \
377 stmfsvc \
378 stmsboot \
379 streams \
380 strings \
381 su \
382 sulogin \
383 sunpc \
384 svc \
385 svr4pkg \
386 swap \
387 sync \
388 sysdef \
389 syseventadm \
390 syslogd \
391 tabs \
392 tar \
393 tbl \
394 tcopy \
395 tcpd \
396 terminfo \
397 th_tools \
398 tic \
399 time \
400 tip \
401 tnf \
402 touch \
403 tplot \
404 tput \
405 tr \
406 trapstat \
407 troff \
408 true \
409 truss \
410 tsol \
411 tty \
412 ttymon \
413 tzreload \
414 uadmin \
415 ul \
416 uname \
417 units \
418 unlink \
419 unpack \
420 users \
421 utmp_update \
422 utmpd \
423 valtools \
424 vgrind \
425 vi \
426 volcheck \
427 volrmmount \
428 vrrpadm \
429 vscan \
430 vt \
432 wall \
433 which \
434 who \
435 whodo \
436 wracct \
437 write \
438 wusbadm \
439 xargs \
440 xstr \
441 yes \
442 ypcmd \
443 yppasswd \
444 zdb \
445 zdump \
446 zfs \
447 zic \
448 zinject \
449 zlogin \
450 zoneadm \
451 zoneadmd \
452 zonecfg \
453 zonename \
454 zpool \
455 zlook \
456 zstreamdump \
457 ztest
459 $(CLOSED_BUILD)COMMON_SUBDIRS += \
460 $(CLOSED)/cmd/iconv \
461 $(CLOSED)/cmd/ksh \
462 $(CLOSED)/cmd/localedef \
463 $(CLOSED)/cmd/more_xpg4 \
464 $(CLOSED)/cmd/mtst \
465 $(CLOSED)/cmd/od \
466 $(CLOSED)/cmd/patch \
467 $(CLOSED)/cmd/pax \
468 $(CLOSED)/cmd/printf \
469 $(CLOSED)/cmd/sed \
470 $(CLOSED)/cmd/sed_xpg4 \
471 $(CLOSED)/cmd/tail
473 i386_SUBDIRS= \
474 acpihpd \
475 addbadsec \
476 biosdev \
477 diskscan \
478 lms \
479 ntfsprogs \
480 parted \
481 rtc \
482 ucodeadm \
485 sparc_SUBDIRS= \
486 cvcd \
487 dcs \
488 device_remap \
489 drd \
490 fps \
491 fruadm \
492 ldmad \
493 oplhpd \
494 prtdscp \
495 prtfru \
496 scadm \
497 sckmd \
498 sf880drd \
499 virtinfo \
500 vntsd
503 # Commands that are messaged. Note that 'lp' and 'man' come first
504 # (see previous comment about 'lp' and 'man').
506 MSGSUBDIRS= \
507 lp \
508 man \
509 abi \
510 acctadm \
511 allocate \
512 asa \
513 audio \
514 audit \
515 auditd \
516 auditrecord \
517 auths \
518 autopush \
519 avs \
520 awk \
521 awk_xpg4 \
522 backup \
523 banner \
524 bart \
525 basename \
526 bnu \
527 bsmconv \
528 bsmunconv \
529 busstat \
530 cal \
531 cat \
532 cdrw \
533 cfgadm \
534 checkeq \
535 checknr \
536 chgrp \
537 chmod \
538 chown \
539 cmd-crypto \
540 cmd-inet \
541 col \
542 compress \
543 consadm \
544 coreadm \
545 cpio \
546 cpc \
547 cron \
548 csh \
549 csplit \
550 ctrun \
551 ctstat \
552 ctwatch \
553 datadm \
554 date \
555 dc \
556 dcs \
557 dd \
558 deroff \
559 devfsadm \
560 dfs.cmds \
561 diff \
562 diffmk \
563 dladm \
564 dlstat \
565 du \
566 dumpcs \
567 ed \
568 eject \
569 env \
570 eqn \
571 expand \
572 expr \
573 fcinfo \
574 fgrep \
575 file \
576 filesync \
577 find \
578 flowadm \
579 flowstat \
580 fm \
581 fold \
582 fs.d \
583 fwflash \
584 geniconvtbl \
585 genmsg \
586 getconf \
587 getent \
588 gettext \
589 gettxt \
590 grep \
591 grep_xpg4 \
592 grpck \
593 gss \
594 halt \
595 head \
596 hostname \
597 hotplug \
598 id \
599 idmap \
600 isaexec \
601 iscsiadm \
602 iscsid \
603 isns \
604 itadm \
605 kbd \
606 krb5 \
607 ksh \
608 kstat \
609 last \
610 ldap \
611 ldapcachemgr \
612 lgrpinfo \
613 locale \
614 lofiadm \
615 logadm \
616 logger \
617 logins \
618 ls \
619 luxadm \
620 lvm \
621 mailx \
622 mesg \
623 mkdir \
624 mkpwdict \
625 mktemp \
626 more \
627 mpathadm \
628 msgfmt \
629 mv \
630 ndmpadm \
631 ndmpstat \
632 newgrp \
633 newtask \
634 nice \
635 nohup \
636 oawk \
637 pack \
638 passwd \
639 passmgmt \
640 pathchk \
641 pfexec \
642 pg \
643 pgrep \
644 picl \
645 pools \
646 power \
647 pr \
648 praudit \
649 print \
650 profiles \
651 projadd \
652 projects \
653 prstat \
654 prtdiag \
655 ps \
656 psrinfo \
657 ptools \
658 pwconv \
659 pwd \
660 pyzfs \
661 raidctl \
662 ramdiskadm \
663 rcap \
664 rcm_daemon \
665 refer \
666 regcmp \
667 renice \
668 roles \
669 rm \
670 rmdir \
671 rmformat \
672 rmmount \
673 rmvolmgr \
674 sasinfo \
675 sbdadm \
676 scadm \
677 script \
678 scsi \
679 sdiff \
680 sdpadm \
681 sgs \
682 sh \
683 shcomp \
684 smbsrv \
685 sort \
686 split \
687 srptadm \
688 ssh \
689 stat \
690 stmfadm \
691 stmsboot \
692 strings \
693 su \
694 svc \
695 svr4pkg \
696 swap \
697 syseventadm \
698 syseventd \
699 tabs \
700 tar \
701 tbl \
702 time \
703 tnf \
704 touch \
705 tput \
706 troff \
707 tsol \
708 tty \
709 ttymon \
710 tzreload \
711 ul \
712 uname \
713 units \
714 unlink \
715 unpack \
716 valtools \
717 vgrind \
718 vi \
719 volcheck \
720 volrmmount \
721 vrrpadm \
722 vscan \
724 who \
725 whodo \
726 wracct \
727 write \
728 wusbadm \
729 xargs \
730 yppasswd \
731 zdump \
732 zfs \
733 zic \
734 zlogin \
735 zoneadm \
736 zoneadmd \
737 zonecfg \
738 zonename \
739 zpool
741 $(CLOSED_BUILD)MSGSUBDIRS += \
742 $(CLOSED)/cmd/iconv \
743 $(CLOSED)/cmd/ksh \
744 $(CLOSED)/cmd/localedef \
745 $(CLOSED)/cmd/more_xpg4 \
746 $(CLOSED)/cmd/od \
747 $(CLOSED)/cmd/patch \
748 $(CLOSED)/cmd/pax \
749 $(CLOSED)/cmd/printf \
750 $(CLOSED)/cmd/sed \
751 $(CLOSED)/cmd/sed_xpg4 \
752 $(CLOSED)/cmd/tail
754 sparc_MSGSUBDIRS= \
755 fruadm \
756 prtdscp \
757 prtfru \
758 virtinfo \
759 vntsd
761 i386_MSGSUBDIRS= \
762 ucodeadm
765 # commands that use dcgettext for localized time, LC_TIME
767 DCSUBDIRS= \
768 cal \
769 cfgadm \
770 diff \
771 ls \
772 pr \
773 ps \
774 tar \
776 who \
777 whodo \
778 write
780 $(CLOSED_BUILD)DCSUBDIRS += \
781 $(CLOSED)/cmd/pax
784 # commands that belong only to audit and device allocation
786 AUDITSUBDIRS= \
787 allocate \
788 amt \
789 audit \
790 audit_warn \
791 auditconfig \
792 auditd \
793 auditrecord \
794 auditreduce \
795 auditstat \
796 praudit \
797 bsmconv \
798 bsmunconv
801 # commands not owned by the systems group
803 BWOSDIRS=
806 all := TARGET = all
807 install := TARGET = install
808 clean := TARGET = clean
809 clobber := TARGET = clobber
810 lint := TARGET = lint
811 _msg := TARGET = _msg
812 _dc := TARGET = _dc
814 .KEEP_STATE:
816 SUBDIRS = $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
818 .PARALLEL: $(BWOSDIRS) $(SUBDIRS) $(MSGSUBDIRS) $(AUDITSUBDIRS)
820 all install clean clobber lint: $(FIRST_SUBDIRS) .WAIT $(SUBDIRS) \
821 $(AUDITSUBDIRS)
824 # Manifests cannot be checked in parallel, because we are using
825 # the global repository that is in $(SRC)/cmd/svc/seed/global.db.
826 # For this reason, to avoid .PARALLEL and .NO_PARALLEL conflicts,
827 # we spawn off a sub-make to perform the non-parallel 'make check'
829 check:
830 $(MAKE) -f Makefile.check check
833 # The .WAIT directive works around an apparent bug in parallel make.
834 # Evidently make was getting the target _msg vs. _dc confused under
835 # some level of parallelization, causing some of the _dc objects
836 # not to be built.
838 _msg: $(MSGSUBDIRS) $($(MACH)_MSGSUBDIRS) .WAIT _dc
840 _dc: $(DCSUBDIRS)
843 # Dependencies
845 fs.d: fstyp
846 ksh: shcomp isaexec
847 print: lp
849 $(FIRST_SUBDIRS) $(BWOSDIRS) $(SUBDIRS) $(AUDITSUBDIRS): FRC
850 @if [ -f $@/Makefile ]; then \
851 cd $@; pwd; $(MAKE) $(TARGET); \
852 else \
853 true; \
856 FRC: