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