import less(1)
[unleashed/tickless.git] / usr / src / cmd / Makefile
bloba3d5a2e50a3bcc6ae2259ab39f6de9852e1620b0
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 command 'perl' is first in the list, violating
36 # alphabetical order. This is because it is very long-running and
37 # should be given the most wall-clock time for a parallel build.
39 # Commands in the FIRST_SUBDIRS list are built before starting the build
40 # of other commands. Currently this includes only 'isaexec' and
41 # 'platexec'. This is necessary because $(ROOT)/usr/lib/isaexec or
42 # $(ROOT)/usr/lib/platexec must exist when some other commands are built
43 # because their 'make install' creates a hard link to one of them.
46 FIRST_SUBDIRS= \
47 isaexec \
48 platexec
50 COMMON_SUBDIRS= \
51 allocate \
52 perl \
53 Adm \
54 abi \
55 adbgen \
56 acct \
57 acctadm \
58 asa \
59 ast \
60 audio \
61 auths \
62 autopush \
63 backup \
64 bart \
65 basename \
66 bc \
67 beadm \
68 boot \
69 busstat \
70 cal \
71 cdrw \
72 cfgadm \
73 chgrp \
74 chmod \
75 chown \
76 chroot \
77 cmd-crypto \
78 cmd-inet \
79 col \
80 compress \
81 consadm \
82 coreadm \
83 cpio \
84 cpc \
85 cron \
86 crypt \
87 csh \
88 csplit \
89 ctfconvert \
90 ctfdiff \
91 ctfdump \
92 ctfmerge \
93 ctrun \
94 ctstat \
95 ctwatch \
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 dmesg \
117 dodatadm \
118 dtrace \
119 du \
120 dumpadm \
121 dumpcs \
122 ed \
123 eeprom \
124 eject \
125 emul64ioctl \
126 enhance \
127 expand \
128 expr \
129 exstr \
130 factor \
131 fcinfo \
132 fcoesvc \
133 fdetach \
134 fdformat \
135 fdisk \
136 ficl \
137 filesync \
138 find \
139 flowadm \
140 flowstat \
141 fm \
142 fmt \
143 fmthard \
144 fmtmsg \
145 fold \
146 format \
147 fs.d \
148 fstyp \
149 fuser \
150 fwflash \
151 gcore \
152 gencat \
153 geniconvtbl \
154 genmsg \
155 getconf \
156 getdevpolicy \
157 getent \
158 getfacl \
159 getmajor \
160 getopt \
161 gettext \
162 gettxt \
163 groups \
164 growfs \
165 grpck \
166 gss \
167 hal \
168 halt \
169 head \
170 hostid \
171 hostname \
172 hotplug \
173 hotplugd \
174 ibd_upgrade \
175 iconv \
176 idmap \
177 init \
178 initpkg \
179 intrd \
180 intrstat \
181 ipcrm \
182 ipcs \
183 ipdadm \
184 ipf \
185 isainfo \
186 isalist \
187 itutools \
188 iscsiadm \
189 iscsid \
190 iscsitsvc \
191 isns \
192 itadm \
193 kbd \
194 keyserv \
195 killall \
196 krb5 \
197 ksh \
198 kvmstat \
199 last \
200 lastcomm \
201 latencytop \
202 ldap \
203 ldapcachemgr \
204 lgrpinfo \
205 line \
206 link \
207 dlmgmtd \
208 listen \
209 loadkeys \
210 locale \
211 lockstat \
212 locator \
213 lofiadm \
214 logadm \
215 logger \
216 login \
217 logins \
218 look \
219 ls \
220 luxadm \
221 mail \
222 mailwrapper \
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 nsadmin \
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 shcomp \
332 smbios \
333 smbsrv \
334 smserverd \
335 sort \
336 spell \
337 split \
338 sqlite \
339 srchtxt \
340 srptadm \
341 srptsvc \
342 stat \
343 stmfadm \
344 stmfsvc \
345 stmsboot \
346 streams \
347 strings \
348 su \
349 sulogin \
350 sunpc \
351 svc \
352 swap \
353 sync \
354 sysdef \
355 syseventadm \
356 syslogd \
357 tail \
358 tar \
359 tcpd \
360 th_tools \
361 tip \
362 terminfo \
363 touch \
364 tr \
365 trapstat \
366 truss \
367 tty \
368 ttymon \
369 tzreload \
370 uadmin \
371 units \
372 unlink \
373 unpack \
374 userattr \
375 users \
376 utmpd \
377 uuidgen \
378 volcheck \
379 volrmmount \
380 vrrpadm \
381 vscan \
382 vt \
384 wall \
385 which \
386 who \
387 whodo \
388 wracct \
389 write \
390 xargs \
391 xhci \
392 xstr \
393 ypcmd \
394 yppasswd \
395 zdb \
396 zdump \
397 zfs \
398 zhack \
399 zinject \
400 zlogin \
401 zoneadm \
402 zoneadmd \
403 zonecfg \
404 zonename \
405 zpool \
406 zlook \
407 zonestat \
408 zstreamdump \
409 ztest
411 i386_SUBDIRS= \
412 acpi \
413 acpihpd \
414 addbadsec \
415 biosdev \
416 diskscan \
417 nvmeadm \
418 rtc \
419 ucodeadm \
421 sparc_SUBDIRS= \
422 cvcd \
423 dcs \
424 device_remap \
425 drd \
426 fruadm \
427 ldmad \
428 oplhpd \
429 prtdscp \
430 prtfru \
431 scadm \
432 sckmd \
433 sf880drd \
434 virtinfo \
435 vntsd
438 # Commands that are messaged.
440 MSGSUBDIRS= \
441 abi \
442 acctadm \
443 allocate \
444 asa \
445 audio \
446 audit \
447 auditconfig \
448 auditd \
449 auditrecord \
450 auditset \
451 auths \
452 autopush \
453 backup \
454 bart \
455 basename \
456 beadm \
457 busstat \
458 cal \
459 cdrw \
460 cfgadm \
461 chgrp \
462 chmod \
463 chown \
464 cmd-crypto \
465 cmd-inet \
466 col \
467 compress \
468 consadm \
469 coreadm \
470 cpio \
471 cpc \
472 cron \
473 csh \
474 csplit \
475 ctrun \
476 ctstat \
477 ctwatch \
478 datadm \
479 date \
480 dc \
481 dcs \
482 dd \
483 devfsadm \
484 dfs.cmds \
485 diff \
486 dladm \
487 dlstat \
488 du \
489 dumpcs \
490 ed \
491 eject \
492 expand \
493 expr \
494 fcinfo \
495 filesync \
496 find \
497 flowadm \
498 flowstat \
499 fm \
500 fold \
501 fs.d \
502 fwflash \
503 geniconvtbl \
504 genmsg \
505 getconf \
506 getent \
507 gettext \
508 gettxt \
509 grpck \
510 gss \
511 halt \
512 head \
513 hostname \
514 hotplug \
515 iconv \
516 idmap \
517 isaexec \
518 iscsiadm \
519 iscsid \
520 isns \
521 itadm \
522 kbd \
523 krb5 \
524 ksh \
525 last \
526 ldap \
527 ldapcachemgr \
528 lgrpinfo \
529 locale \
530 lofiadm \
531 logadm \
532 logger \
533 logins \
534 ls \
535 luxadm \
536 mailx \
537 make \
538 mesg \
539 mkdir \
540 mkpwdict \
541 mktemp \
542 mpathadm \
543 msgfmt \
544 mv \
545 ndmpadm \
546 ndmpstat \
547 newgrp \
548 newtask \
549 nice \
550 nohup \
551 pack \
552 passwd \
553 passmgmt \
554 pathchk \
555 pfexec \
556 pg \
557 pgrep \
558 picl \
559 pools \
560 power \
561 pr \
562 praudit \
563 profiles \
564 projadd \
565 projects \
566 prstat \
567 prtdiag \
568 ps \
569 psrinfo \
570 ptools \
571 raidctl \
572 ramdiskadm \
573 rcap \
574 rcm_daemon \
575 refer \
576 regcmp \
577 renice \
578 roles \
579 rm \
580 rmdir \
581 rmformat \
582 rmmount \
583 rmvolmgr \
584 sasinfo \
585 sbdadm \
586 scadm \
587 script \
588 scsi \
589 sdiff \
590 sdpadm \
591 sgs \
592 shcomp \
593 smbsrv \
594 sort \
595 split \
596 srptadm \
597 stat \
598 stmfadm \
599 stmsboot \
600 strings \
601 su \
602 svc \
603 swap \
604 syseventadm \
605 syseventd \
606 tar \
607 touch \
608 tty \
609 ttymon \
610 tzreload \
611 units \
612 unlink \
613 unpack \
614 userattr \
615 volcheck \
616 volrmmount \
617 vrrpadm \
618 vscan \
620 who \
621 whodo \
622 wracct \
623 write \
624 xargs \
625 yppasswd \
626 zdump \
627 zfs \
628 zlogin \
629 zoneadm \
630 zoneadmd \
631 zonecfg \
632 zonename \
633 zpool \
634 zonestat
636 sparc_MSGSUBDIRS= \
637 fruadm \
638 prtdscp \
639 prtfru \
640 virtinfo \
641 vntsd
643 i386_MSGSUBDIRS= \
644 ucodeadm
647 # commands that use dcgettext for localized time, LC_TIME
649 DCSUBDIRS= \
650 cal \
651 cfgadm \
652 diff \
653 ls \
654 pr \
655 ps \
656 tar \
658 who \
659 whodo \
660 write
663 # commands that belong only to audit.
665 AUDITSUBDIRS= \
666 amt \
667 audit \
668 audit_warn \
669 auditconfig \
670 auditd \
671 auditrecord \
672 auditreduce \
673 auditset \
674 auditstat \
675 praudit
678 # commands not owned by the systems group
680 BWOSDIRS=
683 all := TARGET = all
684 install := TARGET = install
685 clean := TARGET = clean
686 clobber := TARGET = clobber
687 _msg := TARGET = _msg
688 _dc := TARGET = _dc
690 .KEEP_STATE:
692 SUBDIRS = $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
694 .PARALLEL: $(BWOSDIRS) $(SUBDIRS) $(MSGSUBDIRS) $(AUDITSUBDIRS)
696 all install clean clobber: $(FIRST_SUBDIRS) .WAIT $(SUBDIRS) \
697 $(AUDITSUBDIRS)
700 # Manifests cannot be checked in parallel, because we are using
701 # the global repository that is in $(SRC)/cmd/svc/seed/global.db.
702 # For this reason, to avoid .PARALLEL and .NO_PARALLEL conflicts,
703 # we spawn off a sub-make to perform the non-parallel 'make check'
705 check:
706 $(MAKE) -f Makefile.check check
709 # The .WAIT directive works around an apparent bug in parallel make.
710 # Evidently make was getting the target _msg vs. _dc confused under
711 # some level of parallelization, causing some of the _dc objects
712 # not to be built.
714 _msg: $(MSGSUBDIRS) $($(MACH)_MSGSUBDIRS) .WAIT _dc
716 _dc: $(DCSUBDIRS)
719 # Dependencies
721 fs.d: fstyp
722 ksh: shcomp isaexec
723 mdb: terminfo
724 fmt: mailx
726 $(FIRST_SUBDIRS) $(BWOSDIRS) $(SUBDIRS) $(AUDITSUBDIRS): FRC
727 @if [ -f $@/Makefile ]; then \
728 cd $@; pwd; $(MAKE) $(TARGET); \
729 else \
730 true; \
732 FRC: