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