Merge branch 'cleanups'
[unleashed.git] / usr / src / cmd / Makefile
blob2b73ffd73d2ebbe67027c6e8e7ecb3d1e5a214a6
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) 2018, 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 2018 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 ahciem \
59 ast \
60 audio \
61 auths \
62 autopush \
63 backup \
64 bart \
65 basename \
66 bc \
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 mailx \
224 make \
225 mdb \
226 mesg \
227 mkdir \
228 mkfifo \
229 mkfile \
230 mkmsgs \
231 mknod \
232 mkpwdict \
233 mktemp \
234 modload \
235 mpathadm \
236 msgfmt \
237 msgid \
238 mt \
239 mv \
240 mvdir \
241 ndmpadm \
242 ndmpd \
243 ndmpstat \
244 netadm \
245 netfiles \
246 newform \
247 newgrp \
248 news \
249 newtask \
250 nice \
251 nl \
252 nlsadmin \
253 nohup \
254 nscd \
255 oamuser \
256 od \
257 pack \
258 pagesize \
259 passmgmt \
260 passwd \
261 pathchk \
262 pbind \
263 pcidr \
264 pcitool \
265 pfexec \
266 pfexecd \
267 pginfo \
268 pgstat \
269 pgrep \
270 picl \
271 plimit \
272 policykit \
273 pools \
274 power \
275 powertop \
276 ppgsz \
277 pg \
278 plockstat \
279 pr \
280 prctl \
281 printenv \
282 printf \
283 priocntl \
284 profiles \
285 projadd \
286 projects \
287 prstat \
288 prtconf \
289 prtdiag \
290 prtvtoc \
291 ps \
292 psradm \
293 psrinfo \
294 psrset \
295 ptools \
296 pwck \
297 raidctl \
298 ramdiskadm \
299 rcap \
300 rcm_daemon \
301 rctladm \
302 refer \
303 regcmp \
304 renice \
305 rm \
306 rmdir \
307 rmformat \
308 rmmount \
309 rmvolmgr \
310 roles \
311 rpcbind \
312 rpcgen \
313 rpcinfo \
314 rpcsvc \
315 runat \
316 sa \
317 saf \
318 sasinfo \
319 savecore \
320 sbdadm \
321 script \
322 scsi \
323 sdiff \
324 sdpadm \
325 setfacl \
326 setmnt \
327 setpgrp \
328 sgs \
329 smbios \
330 smbsrv \
331 smserverd \
332 sort \
333 spell \
334 split \
335 sqlite \
336 srchtxt \
337 srptadm \
338 srptsvc \
339 stat \
340 stmfadm \
341 stmfsvc \
342 stmsboot \
343 streams \
344 strings \
345 su \
346 sulogin \
347 sunpc \
348 svc \
349 swap \
350 sync \
351 sysdef \
352 syseventadm \
353 syslogd \
354 tail \
355 tar \
356 tcpd \
357 th_tools \
358 tip \
359 terminfo \
360 touch \
361 tr \
362 trapstat \
363 truss \
364 tty \
365 ttymon \
366 tzreload \
367 units \
368 unlink \
369 unpack \
370 userattr \
371 users \
372 utmpd \
373 uuidgen \
374 volcheck \
375 volrmmount \
376 vrrpadm \
377 vscan \
378 vt \
380 wall \
381 which \
382 who \
383 whodo \
384 wracct \
385 write \
386 xargs \
387 xstr \
388 ypcmd \
389 yppasswd \
390 zdb \
391 zdump \
392 zfs \
393 zhack \
394 zinject \
395 zlogin \
396 zoneadm \
397 zoneadmd \
398 zonecfg \
399 zonename \
400 zpool \
401 zlook \
402 zonestat \
403 zstreamdump \
404 ztest
406 i386_SUBDIRS= \
407 acpi \
408 acpihpd \
409 biosdev \
410 diskscan \
411 nvmeadm \
412 rtc \
413 ucodeadm \
414 xhci
417 # Commands that are messaged.
419 MSGSUBDIRS= \
420 abi \
421 acctadm \
422 allocate \
423 audio \
424 audit \
425 auditconfig \
426 auditd \
427 auditrecord \
428 auditset \
429 auths \
430 autopush \
431 backup \
432 bart \
433 basename \
434 busstat \
435 cal \
436 cdrw \
437 cfgadm \
438 chgrp \
439 chmod \
440 chown \
441 cmd-crypto \
442 cmd-inet \
443 col \
444 compress \
445 consadm \
446 coreadm \
447 cpio \
448 cpc \
449 cron \
450 csh \
451 csplit \
452 ctrun \
453 ctstat \
454 ctwatch \
455 datadm \
456 date \
457 dc \
458 dd \
459 devfsadm \
460 dfs.cmds \
461 diff \
462 dladm \
463 dlstat \
464 du \
465 dumpcs \
466 ed \
467 eject \
468 expand \
469 expr \
470 fcinfo \
471 filesync \
472 find \
473 flowadm \
474 flowstat \
475 fm \
476 fold \
477 fs.d \
478 fwflash \
479 geniconvtbl \
480 genmsg \
481 getconf \
482 getent \
483 gettext \
484 gettxt \
485 grpck \
486 gss \
487 halt \
488 head \
489 hostname \
490 hotplug \
491 iconv \
492 idmap \
493 isaexec \
494 iscsiadm \
495 iscsid \
496 isns \
497 itadm \
498 kbd \
499 krb5 \
500 ksh \
501 last \
502 ldap \
503 ldapcachemgr \
504 lgrpinfo \
505 locale \
506 lofiadm \
507 logadm \
508 logger \
509 logins \
510 ls \
511 luxadm \
512 mailx \
513 make \
514 mesg \
515 mkdir \
516 mkpwdict \
517 mktemp \
518 mpathadm \
519 msgfmt \
520 mv \
521 ndmpadm \
522 ndmpstat \
523 newgrp \
524 newtask \
525 nice \
526 nohup \
527 pack \
528 passwd \
529 passmgmt \
530 pathchk \
531 pfexec \
532 pg \
533 pgrep \
534 picl \
535 pools \
536 power \
537 pr \
538 praudit \
539 profiles \
540 projadd \
541 projects \
542 prstat \
543 prtdiag \
544 ps \
545 psrinfo \
546 ptools \
547 raidctl \
548 ramdiskadm \
549 rcap \
550 rcm_daemon \
551 refer \
552 regcmp \
553 renice \
554 roles \
555 rm \
556 rmdir \
557 rmformat \
558 rmmount \
559 rmvolmgr \
560 sasinfo \
561 sbdadm \
562 script \
563 scsi \
564 sdiff \
565 sdpadm \
566 sgs \
567 smbsrv \
568 sort \
569 split \
570 srptadm \
571 stat \
572 stmfadm \
573 stmsboot \
574 strings \
575 su \
576 svc \
577 swap \
578 syseventadm \
579 syseventd \
580 tar \
581 touch \
582 tty \
583 ttymon \
584 tzreload \
585 units \
586 unlink \
587 unpack \
588 userattr \
589 volcheck \
590 volrmmount \
591 vrrpadm \
592 vscan \
594 who \
595 whodo \
596 wracct \
597 write \
598 xargs \
599 yppasswd \
600 zdump \
601 zfs \
602 zlogin \
603 zoneadm \
604 zoneadmd \
605 zonecfg \
606 zonename \
607 zpool \
608 zonestat
610 i386_MSGSUBDIRS= \
611 ucodeadm
614 # commands that use dcgettext for localized time, LC_TIME
616 DCSUBDIRS= \
617 cal \
618 cfgadm \
619 diff \
620 ls \
621 pr \
622 ps \
623 tar \
625 who \
626 whodo \
627 write
630 # commands that belong only to audit.
632 AUDITSUBDIRS= \
633 amt \
634 audit \
635 audit_warn \
636 auditconfig \
637 auditd \
638 auditrecord \
639 auditreduce \
640 auditset \
641 auditstat \
642 praudit
645 # commands not owned by the systems group
647 BWOSDIRS=
650 all := TARGET = all
651 install := TARGET = install
652 clean := TARGET = clean
653 clobber := TARGET = clobber
654 _msg := TARGET = _msg
655 _dc := TARGET = _dc
657 .KEEP_STATE:
659 SUBDIRS = $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
661 .PARALLEL: $(BWOSDIRS) $(SUBDIRS) $(MSGSUBDIRS) $(AUDITSUBDIRS)
663 all install clean clobber: $(FIRST_SUBDIRS) .WAIT $(SUBDIRS) \
664 $(AUDITSUBDIRS)
667 # Manifests cannot be checked in parallel, because we are using
668 # the global repository that is in $(SRC)/cmd/svc/seed/global.db.
669 # For this reason, to avoid .PARALLEL and .NO_PARALLEL conflicts,
670 # we spawn off a sub-make to perform the non-parallel 'make check'
672 check:
673 $(MAKE) -f Makefile.check check
676 # The .WAIT directive works around an apparent bug in parallel make.
677 # Evidently make was getting the target _msg vs. _dc confused under
678 # some level of parallelization, causing some of the _dc objects
679 # not to be built.
681 _msg: $(MSGSUBDIRS) $($(MACH)_MSGSUBDIRS) .WAIT _dc
683 _dc: $(DCSUBDIRS)
686 # Dependencies
688 fs.d: fstyp
689 ksh: isaexec
690 mdb: terminfo
691 fmt: mailx
693 $(FIRST_SUBDIRS) $(BWOSDIRS) $(SUBDIRS) $(AUDITSUBDIRS): FRC
694 @if [ -f $@/Makefile ]; then \
695 cd $@; pwd; $(MAKE) $(TARGET); \
696 else \
697 true; \
699 FRC: