3 # The include file <bsd.own.mk> set common variables for owner,
4 # group, mode, and directories. Defaults are in brackets.
9 # DESTDIR Change the tree where the file gets installed. [not set]
11 # DISTDIR Change the tree where the file for a distribution
12 # gets installed (see /usr/src/release/Makefile). [not set]
14 # COMPRESS_CMD Program to compress documents.
15 # Output is to stdout. [gzip -cn]
17 # COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz]
19 # BINOWN Binary owner. [root]
21 # BINGRP Binary group. [wheel]
23 # BINMODE Binary mode. [555]
25 # NOBINMODE Mode for non-executable files. [444]
27 # LIBDIR Base path for libraries. [/usr/lib]
29 # LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat]
31 # LIBDATADIR Base path for misc. utility data files. [/usr/libdata]
33 # LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint]
35 # SHLIBDIR Base path for shared libraries. [${LIBDIR}]
37 # LIBOWN Library owner. [${BINOWN}]
39 # LIBGRP Library group. [${BINGRP}]
41 # LIBMODE Library mode. [${NOBINMODE}]
44 # KMODDIR Base path for loadable kernel modules
45 # (see kld(4)). [/boot/kernel]
47 # KMODOWN Kernel and KLD owner. [${BINOWN}]
49 # KMODGRP Kernel and KLD group. [${BINGRP}]
51 # KMODMODE KLD mode. [${BINMODE}]
54 # SHAREDIR Base path for architecture-independent ascii
55 # text files. [/usr/share]
57 # SHAREOWN ASCII text file owner. [root]
59 # SHAREGRP ASCII text file group. [wheel]
61 # SHAREMODE ASCII text file mode. [${NOBINMODE}]
64 # DOCDIR Base path for system documentation (e.g. PSD, USD,
65 # handbook, FAQ etc.). [${SHAREDIR}/doc]
67 # DOCOWN Documentation owner. [${SHAREOWN}]
69 # DOCGRP Documentation group. [${SHAREGRP}]
71 # DOCMODE Documentation mode. [${NOBINMODE}]
74 # INFODIR Base path for GNU's hypertext system
75 # called Info (see info(1)). [${SHAREDIR}/info]
77 # INFOOWN Info owner. [${SHAREOWN}]
79 # INFOGRP Info group. [${SHAREGRP}]
81 # INFOMODE Info mode. [${NOBINMODE}]
84 # MANDIR Base path for manual installation. [${SHAREDIR}/man/man]
86 # MANOWN Manual owner. [${SHAREOWN}]
88 # MANGRP Manual group. [${SHAREGRP}]
90 # MANMODE Manual mode. [${NOBINMODE}]
93 # NLSDIR Base path for National Language Support files
94 # installation. [${SHAREDIR}/nls]
96 # NLSOWN National Language Support files owner. [${SHAREOWN}]
98 # NLSGRP National Language Support files group. [${SHAREGRP}]
100 # NLSMODE National Language Support files mode. [${NOBINMODE}]
102 # INCLUDEDIR Base path for standard C include files [/usr/include]
104 .if !target(__<bsd.own.mk>__)
107 .if !defined(_WITHOUT_SRCCONF)
108 SRCCONF?= /etc/src.conf
109 .if exists(${SRCCONF})
110 .include "${SRCCONF}"
120 .if defined(MODULES_WITH_WORLD)
121 KMODDIR?= /boot/modules
123 KMODDIR?= /boot/kernel
127 KMODMODE?= ${BINMODE}
130 LIBCOMPATDIR?= /usr/lib/compat
131 LIBDATADIR?= /usr/libdata
132 LINTLIBDIR?= /usr/libdata/lint
136 LIBMODE?= ${NOBINMODE}
140 SHAREDIR?= /usr/share
143 SHAREMODE?= ${NOBINMODE}
145 MANDIR?= ${SHAREDIR}/man/man
148 MANMODE?= ${NOBINMODE}
150 DOCDIR?= ${SHAREDIR}/doc
153 DOCMODE?= ${NOBINMODE}
155 INFODIR?= ${SHAREDIR}/info
156 INFOOWN?= ${SHAREOWN}
157 INFOGRP?= ${SHAREGRP}
158 INFOMODE?= ${NOBINMODE}
160 NLSDIR?= ${SHAREDIR}/nls
163 NLSMODE?= ${NOBINMODE}
165 INCLUDEDIR?= /usr/include
168 .if !defined(DEBUG_FLAGS)
172 COMPRESS_CMD?= gzip -cn
175 .if !defined(_WITHOUT_SRCCONF)
177 # Define MK_* variables (which are either "yes" or "no") for users
178 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
179 # make(1) environment.
180 # These should be tested with `== "no"' or `!= "no"' in makefiles.
181 # The NO_* variables should only be set by makefiles.
185 # Supported NO_* options (if defined, MK_* will be forced to "no",
186 # regardless of user's setting).
192 .if defined(NO_${var})
198 # Compat NO_* options (same as above, except their use is deprecated).
200 .if !defined(BURN_BRIDGES)
264 .if defined(NO_${var})
265 #.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
269 .endif # !defined(BURN_BRIDGES)
272 # Older-style variables that enabled behaviour when set.
274 .if defined(YES_HESIOD)
277 .if defined(MAKE_IDEA)
282 # MK_* options which default to "yes".
385 WPA_SUPPLICANT_EAPOL \
388 .if defined(WITH_${var}) && defined(WITHOUT_${var})
389 .error WITH_${var} and WITHOUT_${var} can't both be set.
391 .if defined(MK_${var})
392 .error MK_${var} can't be set by a user.
394 .if defined(WITHOUT_${var})
402 # MK_* options which default to "no".
412 .if defined(WITH_${var}) && defined(WITHOUT_${var})
413 .error WITH_${var} and WITHOUT_${var} can't both be set.
415 .if defined(MK_${var})
416 .error MK_${var} can't be set by a user.
418 .if defined(WITH_${var})
426 # Force some options off if their dependencies are off.
427 # Order is somewhat important.
429 .if ${MK_LIBPTHREAD} == "no"
433 .if ${MK_LIBTHR} == "no"
437 .if ${MK_BIND} == "no"
441 MK_BIND_LIBS_LWRES:= no
447 .if ${MK_BIND_MTREE} == "no"
451 .if ${MK_CDDL} == "no"
455 .if ${MK_CRYPT} == "no"
461 .if ${MK_IPX} == "no"
465 .if ${MK_MAIL} == "no"
470 .if ${MK_NETGRAPH} == "no"
475 .if ${MK_OPENSSL} == "no"
484 .if ${MK_TEXTPROC} == "no"
488 .if ${MK_TOOLCHAIN} == "no"
493 # Set defaults for the MK_*_SUPPORT variables.
497 # MK_*_SUPPORT options which default to "yes" unless their corresponding
498 # MK_* variable is set to "no".
510 .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
511 .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
513 .if defined(MK_${var}_SUPPORT)
514 .error MK_${var}_SUPPORT can't be set by a user.
516 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
517 MK_${var}_SUPPORT:= no
519 MK_${var}_SUPPORT:= yes
524 # MK_* options whose default value depends on another option.
529 .if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H})
530 .error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set.
532 .if defined(MK_${vv:H})
533 .error MK_${vv:H} can't be set by a user.
535 .if defined(WITH_${vv:H})
537 .elif defined(WITHOUT_${vv:H})
540 MK_${vv:H}:= ${MK_${vv:T}}
544 .endif # !_WITHOUT_SRCCONF
546 .endif # !target(__<bsd.own.mk>__)