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