]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.opts.mk
Add a FAST_DEPEND option, off by default, which speeds up the build significantly.
[FreeBSD/FreeBSD.git] / share / mk / bsd.opts.mk
1 # $FreeBSD$
2 #
3 # Option file for src builds.
4 #
5 # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf
6 # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no}
7 # with sensible (usually) defaults.
8 #
9 # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that
10 # are applicable for that Makefile (typically there are none, but sometimes there
11 # are exceptions). Recursive makes usually add MK_FOO=no for options that they wish
12 # to omit from that make.
13 #
14 # Makefiles must include bsd.mkopt.mk before they test the value of any MK_FOO
15 # variable.
16 #
17 # Makefiles may also assume that this file is included by bsd.own.mk should it
18 # need variables defined there prior to the end of the Makefile where
19 # bsd.{subdir,lib.bin}.mk is traditionally included.
20 #
21 # The old-style YES_FOO and NO_FOO are being phased out. No new instances of them
22 # should be added. Old instances should be removed since they were just to
23 # bridge the gap between FreeBSD 4 and FreeBSD 5.
24 #
25 # Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an
26 # exception is made for _WITHOUT_SRCONF which turns off this mechanism
27 # completely).
28 #
29
30 .if !target(__<bsd.opts.mk>__)
31 __<bsd.opts.mk>__:
32
33 .if !defined(_WITHOUT_SRCCONF)
34 #
35 # Define MK_* variables (which are either "yes" or "no") for users
36 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
37 # make(1) environment.
38 # These should be tested with `== "no"' or `!= "no"' in makefiles.
39 # The NO_* variables should only be set by makefiles for variables
40 # that haven't been converted over.
41 #
42
43 # Only these options are used by bsd.*.mk. KERBEROS and OPENSSH are
44 # unforutnately needed to support statically linking the entire
45 # tree. su(1) wouldn't link since it depends on PAM which depends on
46 # ssh libraries when building with OPENSSH, and likewise for KERBEROS.
47
48 # All other variables used to build /usr/src live in src.opts.mk
49 # and variables from both files are documented in src.conf(5).
50
51 __DEFAULT_YES_OPTIONS = \
52     ASSERT_DEBUG \
53     DOCCOMPRESS \
54     INCLUDES \
55     INSTALLLIB \
56     KERBEROS \
57     MAN \
58     MANCOMPRESS \
59     NIS \
60     NLS \
61     OPENSSH \
62     PROFILE \
63     SSP \
64     SYMVER \
65     TOOLCHAIN \
66     WARNS
67
68 __DEFAULT_NO_OPTIONS = \
69     FAST_DEPEND \
70     CTF \
71     DEBUG_FILES \
72     INSTALL_AS_USER \
73     STALE_STAGED
74
75 # meta mode related
76 __DEFAULT_DEPENDENT_OPTIONS = \
77     STAGING_MAN/STAGING \
78     STAGING_PROG/STAGING \
79     
80 .include <bsd.mkopt.mk>
81
82 #
83 # Supported NO_* options (if defined, MK_* will be forced to "no",
84 # regardless of user's setting).
85 #
86 # These are transitional and will disappaer in the FreeBSD 12.
87 #
88 .for var in \
89     CTF \
90     DEBUG_FILES \
91     INSTALLLIB \
92     MAN \
93     PROFILE \
94     WARNS
95 .if defined(NO_${var})
96 # This warning may be premature...
97 #.warning "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead."
98 MK_${var}:=no
99 .endif
100 .endfor
101
102 .if ${MK_STAGING} == "no"
103 MK_STALE_STAGED= no
104 .endif
105
106 .endif # !_WITHOUT_SRCCONF
107
108 .endif