]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - share/mk/bsd.own.mk
MFC: r218525: add LIBEXECDIR to the bsd.own.mk
[FreeBSD/stable/8.git] / share / mk / bsd.own.mk
1 # $FreeBSD$
2 #
3 # The include file <bsd.own.mk> set common variables for owner,
4 # group, mode, and directories. Defaults are in brackets.
5 #
6 #
7 # +++ variables +++
8 #
9 # DESTDIR       Change the tree where the file gets installed. [not set]
10 #
11 # DISTDIR       Change the tree where the file for a distribution
12 #               gets installed (see /usr/src/release/Makefile). [not set]
13 #
14 # COMPRESS_CMD  Program to compress documents.
15 #               Output is to stdout. [gzip -cn]
16 #
17 # COMPRESS_EXT  File name extension of ${COMPRESS_CMD} command. [.gz]
18 #
19 # BINOWN        Binary owner. [root]
20 #
21 # BINGRP        Binary group. [wheel]
22 #
23 # BINMODE       Binary mode. [555]
24 #
25 # NOBINMODE     Mode for non-executable files. [444]
26 #
27 # LIBDIR        Base path for libraries. [/usr/lib]
28 #
29 # LIBCOMPATDIR  Base path for compat libraries. [/usr/lib/compat]
30 #
31 # LIBDATADIR    Base path for misc. utility data files. [/usr/libdata]
32 #
33 # LIBEXECDIR    Base path for system daemons and utilities. [/usr/libexec]
34 #
35 # LINTLIBDIR    Base path for lint libraries. [/usr/libdata/lint]
36 #
37 # SHLIBDIR      Base path for shared libraries. [${LIBDIR}]
38 #
39 # LIBOWN        Library owner. [${BINOWN}]
40 #
41 # LIBGRP        Library group. [${BINGRP}]
42 #
43 # LIBMODE       Library mode. [${NOBINMODE}]
44 #
45 #
46 # KMODDIR       Base path for loadable kernel modules
47 #               (see kld(4)). [/boot/kernel]
48 #
49 # KMODOWN       Kernel and KLD owner. [${BINOWN}]
50 #
51 # KMODGRP       Kernel and KLD group. [${BINGRP}]
52 #
53 # KMODMODE      KLD mode. [${BINMODE}]
54 #
55 #
56 # SHAREDIR      Base path for architecture-independent ascii
57 #               text files. [/usr/share]
58 #
59 # SHAREOWN      ASCII text file owner. [root]
60 #
61 # SHAREGRP      ASCII text file group. [wheel]
62 #
63 # SHAREMODE     ASCII text file mode. [${NOBINMODE}]
64 #
65 #
66 # CONFDIR       Base path for configuration files. [/etc]
67 #
68 # CONFOWN       Configuration file owner. [root]
69 #
70 # CONFGRP       Configuration file group. [wheel]
71 #
72 # CONFMODE      Configuration file mode. [644]
73 #
74 #
75 # DOCDIR        Base path for system documentation (e.g. PSD, USD,
76 #               handbook, FAQ etc.). [${SHAREDIR}/doc]
77 #
78 # DOCOWN        Documentation owner. [${SHAREOWN}]
79 #
80 # DOCGRP        Documentation group. [${SHAREGRP}]
81 #
82 # DOCMODE       Documentation mode. [${NOBINMODE}]
83 #
84 #
85 # INFODIR       Base path for GNU's hypertext system
86 #               called Info (see info(1)). [${SHAREDIR}/info]
87 #
88 # INFOOWN       Info owner. [${SHAREOWN}]
89 #
90 # INFOGRP       Info group. [${SHAREGRP}]
91 #
92 # INFOMODE      Info mode. [${NOBINMODE}]
93 #
94 #
95 # MANDIR        Base path for manual installation. [${SHAREDIR}/man/man]
96 #
97 # MANOWN        Manual owner. [${SHAREOWN}]
98 #
99 # MANGRP        Manual group. [${SHAREGRP}]
100 #
101 # MANMODE       Manual mode. [${NOBINMODE}]
102 #
103 #
104 # NLSDIR        Base path for National Language Support files
105 #               installation. [${SHAREDIR}/nls]
106 #
107 # NLSOWN        National Language Support files owner. [${SHAREOWN}]
108 #
109 # NLSGRP        National Language Support files group. [${SHAREGRP}]
110 #
111 # NLSMODE       National Language Support files mode. [${NOBINMODE}]
112 #
113 # INCLUDEDIR    Base path for standard C include files [/usr/include]
114
115 .if !target(__<bsd.own.mk>__)
116 __<bsd.own.mk>__:
117
118 .if !defined(_WITHOUT_SRCCONF)
119 SRCCONF?=       /etc/src.conf
120 .if exists(${SRCCONF})
121 .include "${SRCCONF}"
122 .endif
123 .endif
124
125 # Binaries
126 BINOWN?=        root
127 BINGRP?=        wheel
128 BINMODE?=       555
129 NOBINMODE?=     444
130
131 .if defined(MODULES_WITH_WORLD)
132 KMODDIR?=       /boot/modules
133 .else
134 KMODDIR?=       /boot/kernel
135 .endif
136 KMODOWN?=       ${BINOWN}
137 KMODGRP?=       ${BINGRP}
138 KMODMODE?=      ${BINMODE}
139
140 LIBDIR?=        /usr/lib
141 LIBCOMPATDIR?=  /usr/lib/compat
142 LIBDATADIR?=    /usr/libdata
143 LIBEXECDIR?=    /usr/libexec
144 LINTLIBDIR?=    /usr/libdata/lint
145 SHLIBDIR?=      ${LIBDIR}
146 LIBOWN?=        ${BINOWN}
147 LIBGRP?=        ${BINGRP}
148 LIBMODE?=       ${NOBINMODE}
149
150
151 # Share files
152 SHAREDIR?=      /usr/share
153 SHAREOWN?=      root
154 SHAREGRP?=      wheel
155 SHAREMODE?=     ${NOBINMODE}
156
157 CONFDIR?=       /etc
158 CONFOWN?=       root
159 CONFGRP?=       wheel
160 CONFMODE?=      644
161
162 MANDIR?=        ${SHAREDIR}/man/man
163 MANOWN?=        ${SHAREOWN}
164 MANGRP?=        ${SHAREGRP}
165 MANMODE?=       ${NOBINMODE}
166
167 DOCDIR?=        ${SHAREDIR}/doc
168 DOCOWN?=        ${SHAREOWN}
169 DOCGRP?=        ${SHAREGRP}
170 DOCMODE?=       ${NOBINMODE}
171
172 INFODIR?=       ${SHAREDIR}/info
173 INFOOWN?=       ${SHAREOWN}
174 INFOGRP?=       ${SHAREGRP}
175 INFOMODE?=      ${NOBINMODE}
176
177 NLSDIR?=        ${SHAREDIR}/nls
178 NLSOWN?=        ${SHAREOWN}
179 NLSGRP?=        ${SHAREGRP}
180 NLSMODE?=       ${NOBINMODE}
181
182 INCLUDEDIR?=    /usr/include
183
184 # Common variables
185 .if !defined(DEBUG_FLAGS)
186 STRIP?=         -s
187 .endif
188
189 COMPRESS_CMD?=  gzip -cn
190 COMPRESS_EXT?=  .gz
191
192 .if !defined(_WITHOUT_SRCCONF)
193 #
194 # Define MK_* variables (which are either "yes" or "no") for users
195 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
196 # make(1) environment.
197 # These should be tested with `== "no"' or `!= "no"' in makefiles.
198 # The NO_* variables should only be set by makefiles.
199 #
200
201 #
202 # Supported NO_* options (if defined, MK_* will be forced to "no",
203 # regardless of user's setting).
204 #
205 .for var in \
206     INSTALLLIB \
207     MAN \
208     PROFILE
209 .if defined(NO_${var})
210 WITHOUT_${var}=
211 .endif
212 .endfor
213
214 #
215 # Compat NO_* options (same as above, except their use is deprecated).
216 #
217 .if !defined(BURN_BRIDGES)
218 .for var in \
219     ACPI \
220     ATM \
221     AUDIT \
222     AUTHPF \
223     BIND \
224     BIND_DNSSEC \
225     BIND_ETC \
226     BIND_LIBS_LWRES \
227     BIND_MTREE \
228     BIND_NAMED \
229     BIND_UTILS \
230     BLUETOOTH \
231     BOOT \
232     CALENDAR \
233     CPP \
234     CRYPT \
235     CVS \
236     CXX \
237     DICT \
238     DYNAMICROOT \
239     EXAMPLES \
240     FORTH \
241     FP_LIBC \
242     GAMES \
243     GCOV \
244     GDB \
245     GNU \
246     GPIB \
247     GROFF \
248     HTML \
249     INET6 \
250     INFO \
251     IPFILTER \
252     IPX \
253     KERBEROS \
254     LIB32 \
255     LIBPTHREAD \
256     LIBTHR \
257     LOCALES \
258     LPR \
259     MAILWRAPPER \
260     NETCAT \
261     NIS \
262     NLS \
263     NLS_CATALOGS \
264     NS_CACHING \
265     OBJC \
266     OPENSSH \
267     OPENSSL \
268     PAM \
269     PF \
270     RCMDS \
271     RCS \
272     RESCUE \
273     SENDMAIL \
274     SETUID_LOGIN \
275     SHAREDOCS \
276     SYSCONS \
277     TCSH \
278     TOOLCHAIN \
279     USB \
280     WPA_SUPPLICANT_EAPOL
281 .if defined(NO_${var})
282 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
283 WITHOUT_${var}=
284 .endif
285 .endfor
286 .endif # !defined(BURN_BRIDGES)
287
288 #
289 # Older-style variables that enabled behaviour when set.
290 #
291 .if defined(YES_HESIOD)
292 WITH_HESIOD=
293 .endif
294 .if defined(MAKE_IDEA)
295 WITH_IDEA=
296 .endif
297
298 #
299 # MK_* options which default to "yes".
300 #
301 .for var in \
302     ACCT \
303     ACPI \
304     AMD \
305     APM \
306     ASSERT_DEBUG \
307     AT \
308     ATM \
309     AUDIT \
310     AUTHPF \
311     BIND \
312     BIND_DNSSEC \
313     BIND_ETC \
314     BIND_LIBS_LWRES \
315     BIND_MTREE \
316     BIND_NAMED \
317     BIND_UTILS \
318     BLUETOOTH \
319     BOOT \
320     BSD_CPIO \
321     BSNMP \
322     BZIP2 \
323     CALENDAR \
324     CDDL \
325     CPP \
326     CRYPT \
327     CTM \
328     CVS \
329     CXX \
330     DICT \
331     DYNAMICROOT \
332     EXAMPLES \
333     FLOPPY \
334     FORTH \
335     FP_LIBC \
336     FREEBSD_UPDATE \
337     GAMES \
338     GCOV \
339     GDB \
340     GNU \
341     GNU_GREP \
342     GPIB \
343     GROFF \
344     HTML \
345     INET \
346     INET6 \
347     INFO \
348     INSTALLLIB \
349     IPFILTER \
350     IPFW \
351     IPX \
352     JAIL \
353     KERBEROS \
354     KVM \
355     LEGACY_CONSOLE \
356     LIB32 \
357     LIBPTHREAD \
358     LIBTHR \
359     LOCALES \
360     LOCATE \
361     LPR \
362     MAIL \
363     MAILWRAPPER \
364     MAKE \
365     MAN \
366     NCP \
367     NDIS \
368     NETCAT \
369     NETGRAPH \
370     NIS \
371     NLS \
372     NLS_CATALOGS \
373     NS_CACHING \
374     NTP \
375     OBJC \
376     OPENSSH \
377     OPENSSL \
378     PAM \
379     PF \
380     PKGTOOLS \
381     PMC \
382     PORTSNAP \
383     PPP \
384     PROFILE \
385     QUOTAS \
386     RCMDS \
387     RCS \
388     RESCUE \
389     ROUTED \
390     SENDMAIL \
391     SETUID_LOGIN \
392     SHAREDOCS \
393     SSP \
394     SYSINSTALL \
395     SYMVER \
396     SYSCONS \
397     TCSH \
398     TELNET \
399     TEXTPROC \
400     TOOLCHAIN \
401     USB \
402     WIRELESS \
403     WPA_SUPPLICANT_EAPOL \
404     ZFS \
405     ZONEINFO
406 .if defined(WITH_${var}) && defined(WITHOUT_${var})
407 .error WITH_${var} and WITHOUT_${var} can't both be set.
408 .endif
409 .if defined(MK_${var})
410 .error MK_${var} can't be set by a user.
411 .endif
412 .if defined(WITHOUT_${var})
413 MK_${var}:=     no
414 .else
415 MK_${var}:=     yes
416 .endif
417 .endfor
418
419 #
420 # MK_* options which default to "no".
421 #
422 .for var in \
423     BIND_IDN \
424     BIND_LARGE_FILE \
425     BIND_LIBS \
426     BIND_SIGCHASE \
427     BIND_XML \
428     HESIOD \
429     IDEA
430 .if defined(WITH_${var}) && defined(WITHOUT_${var})
431 .error WITH_${var} and WITHOUT_${var} can't both be set.
432 .endif
433 .if defined(MK_${var})
434 .error MK_${var} can't be set by a user.
435 .endif
436 .if defined(WITH_${var})
437 MK_${var}:=     yes
438 .else
439 MK_${var}:=     no
440 .endif
441 .endfor
442
443 #
444 # Force some options off if their dependencies are off.
445 # Order is somewhat important.
446 #
447 .if ${MK_LIBPTHREAD} == "no"
448 MK_LIBTHR:=     no
449 .endif
450
451 .if ${MK_LIBTHR} == "no"
452 MK_BIND:=       no
453 .endif
454
455 .if ${MK_BIND} == "no"
456 MK_BIND_DNSSEC:= no
457 MK_BIND_ETC:=   no
458 MK_BIND_LIBS:=  no
459 MK_BIND_LIBS_LWRES:= no
460 MK_BIND_MTREE:= no
461 MK_BIND_NAMED:= no
462 MK_BIND_UTILS:= no
463 .endif
464
465 .if ${MK_BIND_MTREE} == "no"
466 MK_BIND_ETC:=   no
467 .endif
468
469 .if ${MK_CDDL} == "no"
470 MK_ZFS:=        no
471 .endif
472
473 .if ${MK_CRYPT} == "no"
474 MK_OPENSSL:=    no
475 MK_OPENSSH:=    no
476 MK_KERBEROS:=   no
477 .endif
478
479 .if ${MK_IPX} == "no"
480 MK_NCP:=        no
481 .endif
482
483 .if ${MK_MAIL} == "no"
484 MK_MAILWRAPPER:= no
485 MK_SENDMAIL:=   no
486 .endif
487
488 .if ${MK_NETGRAPH} == "no"
489 MK_ATM:=        no
490 MK_BLUETOOTH:=  no
491 .endif
492
493 .if ${MK_OPENSSL} == "no"
494 MK_OPENSSH:=    no
495 MK_KERBEROS:=   no
496 .endif
497
498 .if ${MK_PF} == "no"
499 MK_AUTHPF:=     no
500 .endif
501
502 .if ${MK_TEXTPROC} == "no"
503 MK_GROFF:=      no
504 .endif
505
506 .if ${MK_TOOLCHAIN} == "no"
507 MK_GDB:=        no
508 .endif
509
510 #
511 # Set defaults for the MK_*_SUPPORT variables.
512 #
513
514 #
515 # MK_*_SUPPORT options which default to "yes" unless their corresponding
516 # MK_* variable is set to "no".
517 #
518 .for var in \
519     BZIP2 \
520     GNU \
521     INET \
522     INET6 \
523     IPX \
524     KERBEROS \
525     KVM \
526     NETGRAPH \
527     PAM \
528     WIRELESS
529 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
530 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
531 .endif
532 .if defined(MK_${var}_SUPPORT)
533 .error MK_${var}_SUPPORT can't be set by a user.
534 .endif
535 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
536 MK_${var}_SUPPORT:= no
537 .else
538 MK_${var}_SUPPORT:= yes
539 .endif
540 .endfor
541
542 #
543 # MK_* options whose default value depends on another option.
544 #
545 .for vv in \
546     GSSAPI/KERBEROS \
547     MAN_UTILS/MAN
548 .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
549 .error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
550 .endif
551 .if defined(MK_${vv:H})
552 .error MK_${vv:H} can't be set by a user.
553 .endif
554 .if defined(WITH_${vv:H})
555 MK_${vv:H}:=    yes
556 .elif defined(WITHOUT_${vv:H})
557 MK_${vv:H}:=    no
558 .else
559 MK_${vv:H}:=    ${MK_${vv:T}}
560 .endif
561 .endfor
562
563 .endif # !_WITHOUT_SRCCONF
564
565 .endif  # !target(__<bsd.own.mk>__)