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