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