summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/Makefile20
-rw-r--r--share/doc/Makefile4
-rw-r--r--share/doc/smm/Makefile4
-rw-r--r--share/examples/Makefile6
-rw-r--r--share/man/Makefile4
-rw-r--r--share/man/man3/Makefile4
-rw-r--r--share/man/man5/Makefile4
-rw-r--r--share/man/man5/nsswitch.conf.52
-rw-r--r--share/mk/bsd.incs.mk4
-rw-r--r--share/mk/bsd.info.mk6
-rw-r--r--share/mk/bsd.lib.mk10
-rw-r--r--share/mk/bsd.libnames.mk14
-rw-r--r--share/mk/bsd.nls.mk6
-rw-r--r--share/mk/bsd.own.mk276
-rw-r--r--share/mk/bsd.prog.mk8
15 files changed, 328 insertions, 44 deletions
diff --git a/share/Makefile b/share/Makefile
index db2089a..41c348d 100644
--- a/share/Makefile
+++ b/share/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
+.include <bsd.own.mk>
+
# Do not include `info' in the SUBDIR list, it is handled separately.
SUBDIR= ${_colldef} \
@@ -25,7 +27,7 @@ SUBDIR= ${_colldef} \
${_timedef} \
zoneinfo
-.if !defined(NO_LOCALES)
+.if ${MK_LOCALES} != "no"
_colldef = colldef
_mklocale = mklocale
_monetdef = monetdef
@@ -34,35 +36,35 @@ _numericdef = numericdef
_timedef = timedef
.endif
-.if !defined(NO_SYSCONS)
+.if ${MK_SYSCONS} != "no"
_syscons= syscons
.endif
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
_man= man
.endif
-.if !defined(NO_GROFF)
+.if ${MK_GROFF} != "no"
_me= me
.endif
-.if !defined(NO_EXAMPLES)
+.if ${MK_EXAMPLES} != "no"
_examples= examples
.endif
-.if !defined(NO_I4B)
+.if ${MK_I4B} != "no"
_isdn= isdn
.endif
-.if !defined(NO_DICT)
+.if ${MK_DICT} != "no"
_dict= dict
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_sendmail= sendmail
.endif
-.if !defined(NO_SHAREDOCS)
+.if ${MK_SHAREDOCS} != "no"
_doc= doc
.endif
diff --git a/share/doc/Makefile b/share/doc/Makefile
index 6f2742a..5ed5228 100644
--- a/share/doc/Makefile
+++ b/share/doc/Makefile
@@ -1,9 +1,11 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= ${_bind9} IPv6 papers psd smm usd
-.if !defined(NO_BIND)
+.if ${MK_BIND} != "no"
_bind9= bind9
.endif
diff --git a/share/doc/smm/Makefile b/share/doc/smm/Makefile
index 6f8afc4..e6ceda1 100644
--- a/share/doc/smm/Makefile
+++ b/share/doc/smm/Makefile
@@ -1,6 +1,8 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/10/93
# $FreeBSD$
+.include <bsd.own.mk>
+
# The following modules do not describe FreeBSD:
# 14.uucpimpl, 15.uucpnet
@@ -24,7 +26,7 @@ SUBDIR= title \
12.timed \
18.net
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_08.sendmailop= 08.sendmailop
.endif
diff --git a/share/examples/Makefile b/share/examples/Makefile
index 82d940a..abeffcf 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -2,6 +2,8 @@
#
# Doing a make install builds /usr/share/examples
+.include <bsd.own.mk>
+
LDIRS= BSD_daemon \
FreeBSD_version \
IPv6 \
@@ -283,10 +285,10 @@ etc-examples:
.if ${SHARED} != "symlinks"
SUBDIR= smbfs
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
SUBDIR+=ipfilter
.endif
-.if !defined(NO_PF)
+.if ${MK_PF} != "no"
SUBDIR+=pf
.endif
.endif
diff --git a/share/man/Makefile b/share/man/Makefile
index e068635..f1929dc 100644
--- a/share/man/Makefile
+++ b/share/man/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 4/16/94
# $FreeBSD$
+.include <bsd.own.mk>
+
# XXX MISSING: man3f
SUBDIR= man1 man3 man4 man5 man6 man7 man8 man9
@@ -8,7 +10,7 @@ MAKEWHATIS?= makewhatis
makedb:
${MAKEWHATIS} ${DESTDIR}${BINDIR}/man
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
${MAKEWHATIS} ${DESTDIR}${BINDIR}/openssl/man
.endif
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile
index c654faf..b40cdf5 100644
--- a/share/man/man3/Makefile
+++ b/share/man/man3/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 12/13/93
# $FreeBSD$
+.include <bsd.own.mk>
+
MAN= assert.3 \
bitstring.3 \
end.3 \
@@ -144,7 +146,7 @@ MLINKS+= tree.3 RB_EMPTY.3 \
tree.3 SPLAY_RIGHT.3 \
tree.3 SPLAY_ROOT.3
-.if !defined(NO_LIBC_R) || !defined(NO_LIBPTHREAD) || !defined(NO_LIBTHR)
+.if ${MK_LIBC_R} != "no" || ${MK_LIBPTHREAD} != "no" || ${MK_LIBTHR} != "no"
PTHREAD_MAN= pthread.3 \
pthread_atfork.3 \
pthread_attr.3 \
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index 92c7fcb..9d102cc 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
-.include <bsd.init.mk>
+.include <bsd.own.mk>
#MISSING: dump.5 plot.5
MAN= acct.5 \
@@ -69,7 +69,7 @@ MLINKS+=rc.conf.5 rc.conf.local.5
MLINKS+=resolver.5 resolv.conf.5
MLINKS+=utmp.5 lastlog.5 utmp.5 wtmp.5
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
MAN+= hesiod.conf.5
.endif
diff --git a/share/man/man5/nsswitch.conf.5 b/share/man/man5/nsswitch.conf.5
index 28a63ce..48203fa 100644
--- a/share/man/man5/nsswitch.conf.5
+++ b/share/man/man5/nsswitch.conf.5
@@ -276,7 +276,7 @@ This treats nis as the authoritative source of information, except
when the server is down.
.Sh NOTES
If system got compiled with
-.Va NO_NIS
+.Va WITHOUT_NIS
you have to remove
.Sq nis
entries.
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index 924458b..d51fb17 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -4,7 +4,7 @@
.error bsd.incs.mk cannot be included directly.
.endif
-.if !defined(NO_INCS) && !defined(NO_TOOLCHAIN)
+.if !defined(NO_INCS) && ${MK_TOOLCHAIN} != "no"
INCSGROUPS?= INCS
@@ -81,4 +81,4 @@ installincludes:
realinstall: installincludes
.ORDER: beforeinstall installincludes
-.endif # !defined(NO_INCS) && !defined(NO_TOOLCHAIN)
+.endif # !defined(NO_INCS) && ${MK_TOOLCHAIN} != "no"
diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk
index 1de6cf7..826231f 100644
--- a/share/mk/bsd.info.mk
+++ b/share/mk/bsd.info.mk
@@ -53,8 +53,6 @@
#
# MAKEINFOFLAGS Options for ${MAKEINFO} command. [--no-split]
#
-# NO_INFO Do not make or install info files. [not set]
-#
# NO_INFOCOMPRESS If you do not want info files be
# compressed when they are installed. [not set]
#
@@ -123,7 +121,7 @@ DVIPS2ASCII?= dvips2ascii
IFILENS+= ${INFO:S/$/.${_f}/}
.endfor
-.if !defined(NO_INFO)
+.if ${MK_INFO} != "no"
CLEANFILES+= ${IFILENS}
.if !defined(NO_INFOCOMPRESS)
CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/}
@@ -172,7 +170,7 @@ CLEANFILES+= ${INFO:S/$/-la.texi/}
CLEANFILES+= ${INFO:S/$/.info.*.html/} ${INFO:S/$/.info/}
.endif
-.if !defined(NO_INFO) && defined(INFO)
+.if ${MK_INFO} != "no" && defined(INFO)
install: ${INSTALLINFODIRS}
.if !empty(IFILES:N*.html)
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 02f1d46..b968ff8 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -185,7 +185,7 @@ ${SHLIB_NAME}: ${SOBJS}
`lorder ${SOBJS} | tsort -q` ${LDADD}
.endif
-.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && !defined(NO_TOOLCHAIN)
+.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
_LIBS+= lib${LIB}_pic.a
lib${LIB}_pic.a: ${SOBJS}
@@ -210,7 +210,7 @@ ${LINTLIB}: ${LINTOBJS}
all: ${_LIBS}
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
all: _manpages
.endif
@@ -272,7 +272,7 @@ _libinstall:
.endif
.endif
.endif
-.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && !defined(NO_TOOLCHAIN)
+.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
.endif
@@ -287,7 +287,7 @@ _libinstall:
.include <bsd.incs.mk>
.include <bsd.links.mk>
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
realinstall: _maninstall
.ORDER: beforeinstall _maninstall
.endif
@@ -299,7 +299,7 @@ lint: ${SRCS:M*.c}
${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
.endif
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
.include <bsd.man.mk>
.endif
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index abf796b..4536716 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -15,7 +15,7 @@ LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a
LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a
LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a
LIBBEGEMOT?= ${DESTDIR}${LIBDIR}/libbegemot.a
-.if !defined(NO_BIND) && defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
LIBBIND?= ${DESTDIR}${LIBDIR}/libbind.a
LIBBIND9?= ${DESTDIR}${LIBDIR}/libbind9.a
.endif
@@ -54,7 +54,7 @@ LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a
LIBHISTORY?= ${DESTDIR}${LIBDIR}/libhistory.a
LIBIPSEC?= ${DESTDIR}${LIBDIR}/libipsec.a
LIBIPX?= ${DESTDIR}${LIBDIR}/libipx.a
-.if !defined(NO_BIND) && defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
LIBISC?= ${DESTDIR}${LIBDIR}/libisc.a
LIBISCCC?= ${DESTDIR}${LIBDIR}/libisccc.a
LIBISCCFG?= ${DESTDIR}${LIBDIR}/libisccfg.a
@@ -68,7 +68,7 @@ LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a
LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
LIBL?= ${DESTDIR}${LIBDIR}/libl.a
LIBLN?= "don't use LIBLN, use LIBL"
-.if !defined(NO_BIND)
+.if ${MK_BIND} != "no"
LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a
.endif
LIBM?= ${DESTDIR}${LIBDIR}/libm.a
@@ -76,7 +76,7 @@ LIBMAGIC?= ${DESTDIR}${LIBDIR}/libmagic.a
LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a
LIBMEMSTAT?= ${DESTDIR}${LIBDIR}/libmemstat.a
LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a
.endif
LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a
@@ -93,7 +93,7 @@ LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a
LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a
MINUSLPAM= -lpam
.if defined(LDFLAGS) && !empty(LDFLAGS:M-static)
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
LIBPAM+= ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} \
${LIBROKEN} ${LIBCOM_ERR}
MINUSLPAM+= -lkrb5 -lasn1 -lcrypto -lcrypt -lroken -lcom_err
@@ -102,11 +102,11 @@ LIBPAM+= ${LIBRADIUS} ${LIBTACPLUS} ${LIBCRYPT} \
${LIBUTIL} ${LIBOPIE} ${LIBMD}
MINUSLPAM+= -lradius -ltacplus -lcrypt \
-lutil -lopie -lmd
-.if !defined(NO_OPENSSH) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSH} != "no"
LIBPAM+= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
MINUSLPAM+= -lssh -lcrypto -lcrypt
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
LIBPAM+= ${LIBYPCLNT}
MINUSLPAM+= -lypclnt
.endif
diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk
index 237debe..48093eb 100644
--- a/share/mk/bsd.nls.mk
+++ b/share/mk/bsd.nls.mk
@@ -18,8 +18,6 @@
# NLSMODE National Language Support files mode. [${NOBINMODE}]
#
# NLSOWN National Language Support files owner. [${SHAREOWN}]
-#
-# NO_NLS Do not make or install NLS files. [not set]
.if !target(__<bsd.init.mk>__)
.error bsd.nls.mk cannot be included directly.
@@ -32,7 +30,7 @@ GENCAT?= gencat
.msg.cat:
${GENCAT} ${.TARGET} ${.IMPSRC}
-.if defined(NLS) && !empty(NLS) && !defined(NO_NLS)
+.if defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"
#
# .msg file pre-build rules
@@ -73,4 +71,4 @@ SYMLINKS+= ../${file:R}/${NLSNAME}.cat ${NLSDIR}/${dst}/${NLSNAME}.cat
.endfor
.endfor
-.endif # defined(NLS) && !empty(NLS) && !defined(NO_NLS)
+.endif # defined(NLS) && !empty(NLS) && ${MK_NLS} != "no"
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>__)
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 3b4d092..2485a90 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -74,7 +74,7 @@ ${PROG}: ${OBJS}
.endif
-.if !defined(NO_MAN) && !defined(MAN) && \
+.if ${MK_MAN} != "no" && !defined(MAN) && \
!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
!defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
!defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \
@@ -85,7 +85,7 @@ MAN1= ${MAN}
.endif
all: objwarn ${PROG} ${SCRIPTS}
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
all: _manpages
.endif
@@ -177,7 +177,7 @@ NLSNAME?= ${PROG}
.include <bsd.incs.mk>
.include <bsd.links.mk>
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
realinstall: _maninstall
.ORDER: beforeinstall _maninstall
.endif
@@ -191,7 +191,7 @@ lint: ${SRCS:M*.c}
.endif
.endif
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
.include <bsd.man.mk>
.endif
OpenPOWER on IntegriCloud