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