summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.own.mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-03-17 18:54:44 +0000
committerru <ru@FreeBSD.org>2006-03-17 18:54:44 +0000
commit388e590f951441f619cd32710dc151e0ac810a10 (patch)
tree801e953598fc63a37f62cf997017301675552fe9 /share/mk/bsd.own.mk
parenta251964eaca5833ff2c4651fe4f7f8cac7199da5 (diff)
downloadFreeBSD-src-388e590f951441f619cd32710dc151e0ac810a10.zip
FreeBSD-src-388e590f951441f619cd32710dc151e0ac810a10.tar.gz
Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
Diffstat (limited to 'share/mk/bsd.own.mk')
-rw-r--r--share/mk/bsd.own.mk276
1 files changed, 276 insertions, 0 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index ac03fda..17b9ff9b 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -104,6 +104,9 @@
.if !target(__<bsd.own.mk>__)
__<bsd.own.mk>__:
+SRCCONF?= /etc/src.conf
+.sinclude "${SRCCONF}"
+
# Binaries
BINOWN?= root
BINGRP?= wheel
@@ -165,4 +168,277 @@ STRIP?= -s
COMPRESS_CMD?= gzip -cn
COMPRESS_EXT?= .gz
+#
+# Define MK_* variables (which are either "yes" or "no") for users
+# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
+# make(1) environment.
+# These should be tested with `== "no"' or `!= "no"' in makefiles.
+# The NO_* variables should only be set by makefiles.
+#
+
+#
+# Supported NO_* options (if defined, MK_* will be forced to "no",
+# regardless of user's setting).
+#
+.for var in \
+ MAN
+.if defined(NO_${var})
+WITHOUT_${var}=
+.endif
+.endfor
+
+#
+# Compat NO_* options (same as above, except their use is deprecated).
+#
+.if !defined(BURN_BRIDGES)
+.for var in \
+ ACPI \
+ ATM \
+ AUDIT \
+ AUTHPF \
+ BIND \
+ BIND_DNSSEC \
+ BIND_ETC \
+ BIND_LIBS_LWRES \
+ BIND_MTREE \
+ BIND_NAMED \
+ BIND_UTILS \
+ BLUETOOTH \
+ BOOT \
+ CALENDAR \
+ COLLECT2 \
+ CPP \
+ CRYPT \
+ CVS \
+ CXX \
+ DICT \
+ DYNAMICROOT \
+ EXAMPLES \
+ FORTH \
+ FORTRAN \
+ FP_LIBC \
+ GAMES \
+ GCOV \
+ GDB \
+ GNU \
+ GPIB \
+ GROFF \
+ HTML \
+ I4B \
+ INET6 \
+ INFO \
+ IPFILTER \
+ IPX \
+ KERBEROS \
+ LIBC_R \
+ LIBPTHREAD \
+ LIBTHR \
+ LOCALES \
+ LPR \
+ MAILWRAPPER \
+ NETCAT \
+ NIS \
+ NLS \
+ NLS_CATALOGS \
+ OBJC \
+ OPENSSH \
+ OPENSSL \
+ PAM \
+ PCVT \
+ PF \
+ RCMDS \
+ RCS \
+ RESCUE \
+ SENDMAIL \
+ SETUID_LOGIN \
+ SHAREDOCS \
+ SYSCONS \
+ TCSH \
+ TOOLCHAIN \
+ USB \
+ WPA_SUPPLICANT_EAPOL
+.if defined(NO_${var})
+#.warning NO_${var} is deprecated in favour of WITHOUT_${var}=
+WITHOUT_${var}=
+.endif
+.endfor
+.endif # !defined(BURN_BRIDGES)
+
+#
+# Older-style variables that enabled behaviour when set.
+#
+.if defined(YES_HESIOD)
+WITH_HESIOD=
+.endif
+.if defined(MAKE_IDEA)
+WITH_IDEA=
+.endif
+
+#
+# MK_* options which default to "yes".
+#
+.for var in \
+ ACPI \
+ ATM \
+ AUDIT \
+ AUTHPF \
+ BIND \
+ BIND_DNSSEC \
+ BIND_ETC \
+ BIND_LIBS_LWRES \
+ BIND_MTREE \
+ BIND_NAMED \
+ BIND_UTILS \
+ BLUETOOTH \
+ BOOT \
+ CALENDAR \
+ COLLECT2 \
+ CPP \
+ CRYPT \
+ CVS \
+ CXX \
+ DICT \
+ DYNAMICROOT \
+ EXAMPLES \
+ FORTH \
+ FORTRAN \
+ FP_LIBC \
+ GAMES \
+ GCOV \
+ GDB \
+ GNU \
+ GPIB \
+ GROFF \
+ HTML \
+ I4B \
+ INET6 \
+ INFO \
+ IPFILTER \
+ IPX \
+ KERBEROS \
+ LIBC_R \
+ LIBPTHREAD \
+ LIBTHR \
+ LOCALES \
+ LPR \
+ MAILWRAPPER \
+ MAN \
+ NETCAT \
+ NIS \
+ NLS \
+ NLS_CATALOGS \
+ OBJC \
+ OPENSSH \
+ OPENSSL \
+ PAM \
+ PCVT \
+ PF \
+ RCMDS \
+ RCS \
+ RESCUE \
+ SENDMAIL \
+ SETUID_LOGIN \
+ SHAREDOCS \
+ SYSCONS \
+ TCSH \
+ TOOLCHAIN \
+ USB \
+ WPA_SUPPLICANT_EAPOL
+.if defined(WITH_${var}) && defined(WITHOUT_${var})
+.error WITH_${var} and WITHOUT_${var} can't both be set.
+.endif
+.if defined(MK_${var})
+.error MK_${var} can't be set by a user.
+.endif
+.if defined(WITHOUT_${var})
+MK_${var}:= no
+.else
+MK_${var}:= yes
+.endif
+.endfor
+
+#
+# MK_* options which default to "no".
+#
+.for var in \
+ BIND_LIBS \
+ HESIOD \
+ IDEA
+.if defined(WITH_${var}) && defined(WITHOUT_${var})
+.error WITH_${var} and WITHOUT_${var} can't both be set.
+.endif
+.if defined(MK_${var})
+.error MK_${var} can't be set by a user.
+.endif
+.if defined(WITH_${var})
+MK_${var}:= yes
+.else
+MK_${var}:= no
+.endif
+.endfor
+
+#
+# Force some options off if their dependencies are off.
+#
+.if ${MK_BIND} == "no"
+MK_BIND_DNSSEC:= no
+MK_BIND_ETC:= no
+MK_BIND_LIBS:= no
+MK_BIND_LIBS_LWRES:= no
+MK_BIND_MTREE:= no
+MK_BIND_NAMED:= no
+MK_BIND_UTILS:= no
+.endif
+
+.if ${MK_CRYPT} == "no"
+MK_OPENSSL:= no
+MK_OPENSSH:= no
+MK_KERBEROS:= no
+.endif
+
+.if ${MK_CXX} == "no"
+MK_COLLECT2:= no
+.endif
+
+.if ${MK_OPENSSL} == "no"
+MK_OPENSSH:= no
+MK_KERBEROS:= no
+.endif
+
+.if ${MK_PF} == "no"
+MK_AUTHPF:= no
+.endif
+
+.if ${MK_TOOLCHAIN} == "no"
+MK_GDB:= no
+.endif
+
+#
+# Set defaults for the MK_*_SUPPORT variables.
+#
+
+#
+# MK_*_SUPPORT options which default to "yes" unless their corresponding
+# MK_* variable is set to "no".
+#
+.for var in \
+ GNU \
+ HESIOD \
+ INET6 \
+ IPX \
+ KERBEROS \
+ PAM
+.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT)
+.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set.
+.endif
+.if defined(MK_${var}_SUPPORT)
+.error MK_${var}_SUPPORT can't be set by a user.
+.endif
+.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
+MK_${var}_SUPPORT:= no
+.else
+MK_${var}_SUPPORT:= yes
+.endif
+.endfor
+
.endif # !target(__<bsd.own.mk>__)
OpenPOWER on IntegriCloud