summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--Makefile.inc175
-rw-r--r--bin/Makefile8
-rw-r--r--bin/Makefile.inc4
-rw-r--r--bin/csh/Makefile6
-rw-r--r--bin/ed/Makefile4
-rw-r--r--contrib/bind9/FREEBSD-Upgrade2
-rw-r--r--crypto/openssh/FREEBSD-upgrade2
-rw-r--r--etc/Makefile46
-rw-r--r--etc/hosts.allow2
-rw-r--r--etc/mtree/Makefile6
-rwxr-xr-xetc/rc.d/Makefile4
-rw-r--r--games/factor/Makefile4
-rw-r--r--gnu/lib/Makefile8
-rw-r--r--gnu/lib/libdialog/Makefile4
-rw-r--r--gnu/usr.bin/Makefile20
-rw-r--r--gnu/usr.bin/bc/Makefile4
-rw-r--r--gnu/usr.bin/cc/Makefile14
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile10
-rw-r--r--gnu/usr.bin/cvs/cvs/Makefile3
-rw-r--r--gnu/usr.bin/dialog/Makefile4
-rw-r--r--include/Makefile14
-rw-r--r--kerberos5/Makefile10
-rw-r--r--lib/Makefile24
-rw-r--r--lib/bind/bind/Makefile4
-rw-r--r--lib/bind/bind9/Makefile4
-rw-r--r--lib/bind/config.mk16
-rw-r--r--lib/bind/dns/Makefile4
-rw-r--r--lib/bind/isc/Makefile4
-rw-r--r--lib/bind/isccc/Makefile4
-rw-r--r--lib/bind/isccfg/Makefile4
-rw-r--r--lib/bind/lwres/Makefile8
-rw-r--r--lib/libc/Makefile10
-rw-r--r--lib/libc/net/Makefile.inc2
-rw-r--r--lib/libcrypt/Makefile4
-rw-r--r--lib/libfetch/Makefile4
-rw-r--r--lib/libipsec/Makefile4
-rw-r--r--lib/libmilter/Makefile4
-rw-r--r--lib/libncurses/Makefile4
-rw-r--r--lib/libpam/modules/modules.inc6
-rw-r--r--lib/libpam/modules/pam_unix/Makefile4
-rw-r--r--lib/libpcap/Makefile4
-rw-r--r--lib/libradius/Makefile4
-rw-r--r--lib/librpcsvc/Makefile4
-rw-r--r--lib/libsm/Makefile4
-rw-r--r--lib/libtelnet/Makefile6
-rw-r--r--lib/libwrap/Makefile6
-rw-r--r--lib/ncurses/ncurses/Makefile4
-rw-r--r--libexec/Makefile10
-rw-r--r--libexec/ftpd/Makefile4
-rw-r--r--libexec/lukemftpd/Makefile4
-rw-r--r--libexec/tcpd/Makefile4
-rw-r--r--libexec/telnetd/Makefile6
-rw-r--r--release/Makefile4
-rw-r--r--release/picobsd/tinyware/login/Makefile4
-rw-r--r--rescue/librescue/Makefile6
-rw-r--r--rescue/rescue/Makefile17
-rw-r--r--sbin/Makefile12
-rw-r--r--sbin/Makefile.inc4
-rw-r--r--sbin/geom/class/Makefile4
-rw-r--r--sbin/ggate/Makefile4
-rw-r--r--secure/Makefile14
-rw-r--r--secure/Makefile.inc6
-rw-r--r--secure/lib/Makefile6
-rw-r--r--secure/lib/libcrypto/Makefile8
-rw-r--r--secure/lib/libcrypto/Makefile.inc4
-rw-r--r--secure/lib/libssh/Makefile4
-rw-r--r--secure/libexec/Makefile6
-rw-r--r--secure/usr.bin/Makefile6
-rw-r--r--secure/usr.bin/ssh/Makefile4
-rw-r--r--secure/usr.sbin/Makefile4
-rw-r--r--secure/usr.sbin/sshd/Makefile6
-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
-rw-r--r--sys/Makefile4
-rw-r--r--sys/boot/Makefile4
-rw-r--r--sys/boot/alpha/common/Makefile.common4
-rw-r--r--sys/boot/i386/loader/Makefile4
-rw-r--r--sys/boot/ia64/efi/Makefile7
-rw-r--r--sys/boot/ia64/ski/Makefile7
-rw-r--r--sys/boot/pc98/loader/Makefile4
-rw-r--r--sys/boot/powerpc/loader/Makefile4
-rw-r--r--sys/boot/powerpc/ofw/Makefile4
-rw-r--r--sys/boot/sparc64/loader/Makefile4
-rw-r--r--sys/modules/Makefile10
-rw-r--r--sys/modules/dummynet/Makefile4
-rw-r--r--sys/modules/if_bridge/Makefile4
-rw-r--r--sys/modules/if_gif/Makefile8
-rw-r--r--sys/modules/ipfilter/Makefile4
-rw-r--r--sys/modules/ipfw/Makefile4
-rw-r--r--sys/modules/netgraph/Makefile6
-rw-r--r--sys/modules/pf/Makefile4
-rw-r--r--sys/modules/pflog/Makefile4
-rw-r--r--usr.bin/Makefile30
-rw-r--r--usr.bin/chkey/Makefile4
-rw-r--r--usr.bin/chpass/Makefile10
-rw-r--r--usr.bin/fetch/Makefile4
-rw-r--r--usr.bin/login/Makefile4
-rw-r--r--usr.bin/netstat/Makefile6
-rw-r--r--usr.bin/newkey/Makefile4
-rw-r--r--usr.bin/passwd/Makefile4
-rw-r--r--usr.bin/telnet/Makefile6
-rw-r--r--usr.sbin/Makefile48
-rw-r--r--usr.sbin/amd/Makefile.inc6
-rw-r--r--usr.sbin/amd/amd/Makefile6
-rw-r--r--usr.sbin/amd/include/Makefile6
-rw-r--r--usr.sbin/bootparamd/bootparamd/Makefile4
-rw-r--r--usr.sbin/bsnmpd/modules/Makefile4
-rw-r--r--usr.sbin/mailwrapper/Makefile10
-rw-r--r--usr.sbin/ntp/Makefile.inc4
-rw-r--r--usr.sbin/ntp/doc/Makefile4
-rw-r--r--usr.sbin/ntp/ntp-keygen/Makefile7
-rw-r--r--usr.sbin/ntp/ntpd/Makefile7
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile7
-rw-r--r--usr.sbin/ntp/ntpq/Makefile7
-rw-r--r--usr.sbin/pkg_install/Makefile4
-rw-r--r--usr.sbin/pkg_install/Makefile.inc4
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.sh2
-rw-r--r--usr.sbin/ppp/Makefile12
-rw-r--r--usr.sbin/pppd/Makefile4
-rw-r--r--usr.sbin/rpcbind/Makefile3
-rw-r--r--usr.sbin/sendmail/Makefile8
-rw-r--r--usr.sbin/tcpdchk/Makefile4
-rw-r--r--usr.sbin/tcpdmatch/Makefile4
-rw-r--r--usr.sbin/tcpdump/tcpdump/Makefile6
-rw-r--r--usr.sbin/wpa/wpa_supplicant/Makefile6
138 files changed, 887 insertions, 379 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 1bbddcd..ea030e5 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2,20 +2,10 @@
# $FreeBSD$
#
# Make command line options:
-# -DNO_DYNAMICROOT do not link /bin and /sbin dynamically
-# -DNO_KERBEROS Do not build Heimdal (Kerberos 5)
-# -DNO_RESCUE do not build rescue binaries
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
# -DNO_CLEAN do not clean at all
-# -DNO_CRYPT will prevent building of crypt versions
-# -DNO_MAN do not build the manual pages
-# -DNO_NLS do not build Native Language Support files
# -DNO_PROFILE do not build profiled libraries
-# -DNO_GAMES do not go into games subdir
# -DNO_SHARE do not go into share subdir
-# -DNO_INFO do not make or install info files
-# -DNO_LIBC_R do not build libc_r.
-# -DNO_FORTRAN do not build g77 and related libraries.
# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
@@ -34,6 +24,8 @@
# /usr/share/mk. These include:
# obj depend all install clean cleandepend cleanobj
+.include <bsd.own.mk>
+
# We must do share/info early so that installation of info `dir'
# entries works correctly. Do it first since it is less likely to
# grow dependencies on include and lib than vice versa.
@@ -46,18 +38,18 @@
# We must do etc last for install/distribute to work.
#
SUBDIR= share/info include lib libexec bin
-.if !defined(NO_GAMES)
+.if ${MK_GAMES} != "no"
SUBDIR+=games
.endif
SUBDIR+=gnu
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
SUBDIR+=kerberos5
.endif
-.if !defined(NO_RESCUE)
+.if ${MK_RESCUE} != "no"
SUBDIR+=rescue
.endif
SUBDIR+=sbin
-.if !defined(NO_CRYPT)
+.if ${MK_CRYPT} != "no"
SUBDIR+=secure
.endif
.if !defined(NO_SHARE)
@@ -186,8 +178,9 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
DESTDIR= \
BOOTSTRAPPING=${OSRELDATE} \
- -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_NLS -DNO_PIC \
- -DNO_PROFILE -DNO_SHARED -DNO_CPU_CFLAGS -DNO_WARNS
+ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
+ -DWITHOUT_NLS -DNO_PIC -DNO_PROFILE -DNO_SHARED \
+ -DNO_CPU_CFLAGS -DNO_WARNS
# build-tools stage
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
@@ -196,7 +189,8 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS
# cross-tools stage
-XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
+XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
+ -DWITHOUT_FORTRAN -DWITHOUT_GDB
# world stage
WMAKEENV= ${CROSSENV} \
@@ -241,7 +235,8 @@ LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
SHLIBDIR=/usr/lib32
LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
- -DNO_BIND -DNO_MAN -DNO_NLS -DNO_INFO -DNO_HTML
+ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_INFO \
+ -DWITHOUT_HTML
LIB32IMAKE= ${LIB32MAKE:NINSTALL=*} -DNO_INCS
.endif
@@ -318,7 +313,7 @@ _worldtmp:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
ln -sf ${.CURDIR}/sys ${WORLDTMP}
-.if defined(WITH_BIND_LIBS) && !defined(NO_BIND)
+.if ${MK_BIND_LIBS} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
.endif
@@ -375,8 +370,8 @@ _libraries:
@echo ">>> stage 4.2: building libraries"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; \
- ${WMAKE} -DNO_FSCHG -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN \
- -DNO_NLS -DNO_PROFILE libraries
+ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+ -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE libraries
_depend:
@echo
@echo "--------------------------------------------------------------"
@@ -405,7 +400,7 @@ build32:
-p ${LIB32TMP}/usr/include >/dev/null
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
.for _t in obj depend all
cd ${.CURDIR}/kerberos5/tools; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t}
@@ -418,11 +413,11 @@ build32:
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
cd ${.CURDIR}/gnu/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
-.if !defined(NO_CRYPT)
+.if ${MK_CRYPT} != "no"
cd ${.CURDIR}/secure/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endif
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
cd ${.CURDIR}/kerberos5/lib; \
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endif
@@ -450,7 +445,7 @@ distribute32 install32:
.endif
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
-.if !defined(NO_CRYPT)
+.if ${MK_CRYPT} != "no"
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
@@ -507,11 +502,11 @@ installcheck_DESTDIR:
#
CHECK_UIDS=
CHECK_GIDS= audit
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
CHECK_UIDS+= smmsp
CHECK_GIDS+= smmsp
.endif
-.if !defined(NO_PF)
+.if ${MK_PF} != "no"
CHECK_UIDS+= proxy
CHECK_GIDS+= proxy authpf
.endif
@@ -782,11 +777,11 @@ legacy:
#
# bootstrap-tools: Build tools needed for compatibility
#
-.if !defined(NO_GAMES)
+.if ${MK_GAMES} != "no"
_strfile= games/fortune/strfile
.endif
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
_gperf= gnu/usr.bin/gperf
.if ${BOOTSTRAPPING} < 700004
_groff= gnu/usr.bin/groff
@@ -815,7 +810,7 @@ _gencat= usr.bin/gencat
_mklocale= usr.bin/mklocale
.endif
-.if !defined(NO_RESCUE) && \
+.if ${MK_RESCUE} != "no" && \
${BOOTSTRAPPING} < 600008
_crunchgen= usr.sbin/crunch/crunchgen
.endif
@@ -865,11 +860,11 @@ _aicasm= sys/modules/aic7xxx/aicasm
_share= share/syscons/scrnmaps
.endif
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
_kerberos5_tools= kerberos5/tools
.endif
-.if !defined(NO_RESCUE)
+.if ${MK_RESCUE} != "no"
_rescue= rescue/rescue
.endif
@@ -906,7 +901,7 @@ build-tools:
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
_btxld= usr.sbin/btxld
.endif
-.if !defined(NO_RESCUE) || defined(RELEASEDIR)
+.if ${MK_RESCUE} != "no" || defined(RELEASEDIR)
_crunchide= usr.sbin/crunch/crunchide
.endif
.if ${TARGET_ARCH} == "alpha"
@@ -969,7 +964,7 @@ _prebuild_libs=
_generic_libs= gnu/lib
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
_prebuild_libs+= kerberos5/lib/libasn1
_prebuild_libs+= kerberos5/lib/libkrb5
_prebuild_libs+= kerberos5/lib/libroken
@@ -987,14 +982,14 @@ lib/libopie__L lib/libtacplus__L: lib/libmd__L
_generic_libs+= lib
-.if !defined(NO_CRYPT)
-.if !defined(NO_OPENSSL)
+.if ${MK_CRYPT} != "no"
+.if ${MK_OPENSSL} != "no"
_prebuild_libs+= secure/lib/libcrypto secure/lib/libssl
lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
_prebuild_libs+= secure/lib/libssh
secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS} != "no"
secure/lib/libssh__L: lib/libgssapi__L
.endif
.endif
@@ -1002,11 +997,11 @@ secure/lib/libssh__L: lib/libgssapi__L
_generic_libs+= secure/lib
.endif
-.if defined(NO_CRYPT) || defined(NO_OPENSSL)
+.if ${MK_OPENSSL} == "no"
lib/libradius__L: lib/libmd__L
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
_prebuild_libs+= lib/libypclnt
.endif
diff --git a/bin/Makefile b/bin/Makefile
index a56de99..1b3ee7a 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -1,6 +1,8 @@
# From: @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= cat \
chflags \
chio \
@@ -37,15 +39,15 @@ SUBDIR= cat \
sync \
test
-.if !defined(NO_RCMDS)
+.if ${MK_RCMDS} != "no"
_rcp= rcp
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_rmail= rmail
.endif
-.if !defined(NO_TCSH)
+.if ${MK_TCSH} != "no"
_csh= csh
.endif
diff --git a/bin/Makefile.inc b/bin/Makefile.inc
index b1f1612..ec24a48 100644
--- a/bin/Makefile.inc
+++ b/bin/Makefile.inc
@@ -1,9 +1,11 @@
# @(#)Makefile.inc 8.1 (Berkeley) 5/31/93
# $FreeBSD$
+.include <bsd.own.mk>
+
BINDIR?= /bin
WARNS?= 6
-.if defined(NO_DYNAMICROOT)
+.if ${MK_DYNAMICROOT} == "no"
NO_SHARED?= YES
.endif
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index dd3b002..fb58cfb 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -6,6 +6,8 @@
#
# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
+.include <bsd.own.mk>
+
TCSHDIR= ${.CURDIR}/../../contrib/tcsh
.PATH: ${TCSHDIR}
@@ -45,7 +47,7 @@ LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
CLEANFILES= ${GENHDRS} gethost csh.1
-.if !defined(NO_EXAMPLES)
+.if ${MK_EXAMPLES} != "no"
FILESDIR= ${SHAREDIR}/examples/tcsh
FILES= complete.tcsh csh-mode.el
.endif
@@ -70,7 +72,7 @@ NLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \
NLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15
NLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15
-.if defined(NO_NLS_CATALOGS) || defined(RESCUE)
+.if ${MK_NLS_CATALOGS} == "no" || defined(RESCUE)
CFLAGS+= -DNO_NLS_CATALOGS
.else
CFLAGS+= -DHAVE_ICONV
diff --git a/bin/ed/Makefile b/bin/ed/Makefile
index 9e6afd7..0679fe8 100644
--- a/bin/ed/Makefile
+++ b/bin/ed/Makefile
@@ -1,11 +1,13 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ed
SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c
LINKS= ${BINDIR}/ed ${BINDIR}/red
MLINKS= ed.1 red.1
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
CFLAGS+=-DDES
WARNS?= 2
DPADD= ${LIBCRYPTO}
diff --git a/contrib/bind9/FREEBSD-Upgrade b/contrib/bind9/FREEBSD-Upgrade
index 1e1e71f..f3516cd 100644
--- a/contrib/bind9/FREEBSD-Upgrade
+++ b/contrib/bind9/FREEBSD-Upgrade
@@ -56,7 +56,7 @@
Note that we intentionally disable IPv6 support on the configure
command line; src/lib/bind/config.mk will re-enable it at compile
- time if NO_INET6 is not defined.
+ time if WITHOUT_INET6 is not defined.
8) Copy the following generated files to src/lib/bind and commit them:
diff --git a/crypto/openssh/FREEBSD-upgrade b/crypto/openssh/FREEBSD-upgrade
index 757d9e8..12d218c 100644
--- a/crypto/openssh/FREEBSD-upgrade
+++ b/crypto/openssh/FREEBSD-upgrade
@@ -46,7 +46,7 @@
Note that we don't want to configure OpenSSH for Kerberos using
configure since we have to be able to turn it on or off depending
- on the value of NO_KERBEROS. Our Makefiles take care of this.
+ on the value of MK_KERBEROS. Our Makefiles take care of this.
8) Commit the resulting config.h. Make sure you don't accidentally
commit any other files created by autoconf, autoheader or
diff --git a/etc/Makefile b/etc/Makefile
index d1045f8..9933975 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,7 +1,9 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
# $FreeBSD$
-.if !defined(NO_SENDMAIL)
+.include <bsd.own.mk>
+
+.if ${MK_SENDMAIL} != "no"
SUBDIR= sendmail
.endif
@@ -29,16 +31,16 @@ BSM_ETC_RESTRICTED_FILES= ${OPENBSMDIR}/etc/audit_control \
BSM_ETC_EXEC_FILES= ${OPENBSMDIR}/etc/audit_warn
BSM_ETC_DIR= ${DESTDIR}/etc/security
-.if !defined(NO_LPR)
+.if ${MK_LPR} != "no"
BIN1+= printcap
.endif
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
SSH= ${.CURDIR}/../crypto/openssh/ssh_config \
${.CURDIR}/../crypto/openssh/sshd_config \
${.CURDIR}/../crypto/openssh/moduli
.endif
+.if ${MK_OPENSSL} != "no"
SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf
.endif
@@ -47,24 +49,24 @@ BIN2= netstart pccard_ether rc.suspend rc.resume
MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
BSD.var.dist BSD.x11.dist BSD.x11-4.dist
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
MTREE+= BSD.sendmail.dist
.endif
-.if !defined(NO_BIND)
+.if ${MK_BIND} != "no"
MTREE+= BIND.chroot.dist
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
MTREE+= BIND.include.dist
.endif
.endif
-.if !defined(NO_BIND_ETC) && !defined(NO_BIND)
+.if ${MK_BIND_ETC} != "no"
NAMEDB= PROTO.localhost.rev PROTO.localhost-v6.rev named.conf named.root \
make-localhost
.endif
PPPCNF= ppp.conf
-.if defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} == "no"
ETCMAIL=mailer.conf aliases
.else
ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
@@ -75,7 +77,7 @@ ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
FREEBSD=COPYRIGHT
afterinstall:
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
cd ${.CURDIR}/../share/man; ${MAKE} makedb
.endif
@@ -125,21 +127,21 @@ distribution:
${BSM_ETC_RESTRICTED_FILES} ${BSM_ETC_DIR}
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0500 \
${BSM_ETC_EXEC_FILES} ${BSM_ETC_DIR}
-.if !defined(NO_I4B)
+.if ${MK_I4B} != "no"
cd ${.CURDIR}/isdn; ${MAKE} install
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
cd ${.CURDIR}/sendmail; ${MAKE} distribution
.endif
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${SSH} ${DESTDIR}/etc/ssh
.endif
+.if ${MK_OPENSSL} != "no"
cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${SSL} ${DESTDIR}/etc/ssl
.endif
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS} != "no"
cd ${.CURDIR}/root; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.k5login ${DESTDIR}/root/.k5login;
@@ -156,18 +158,16 @@ distribution:
ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
${MTREE} ${DESTDIR}/etc/mtree
-.if !defined(NO_BIND)
-.if !defined(NO_BIND_ETC)
+.if ${MK_BIND_ETC} != "no"
cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${NAMEDB} ${DESTDIR}/var/named/etc/namedb
.endif
-.if !defined(NO_BIND_MTREE)
+.if ${MK_BIND_MTREE} != "no"
@if [ ! -e ${DESTDIR}/etc/namedb ]; then \
set -x; \
ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
fi
.endif
-.endif
cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
${PPPCNF} ${DESTDIR}/etc/ppp
cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
@@ -195,17 +195,15 @@ distrib-dirs:
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
-p ${DESTDIR}/usr/include
-.if !defined(NO_BIND)
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
-p ${DESTDIR}/usr/include
.endif
-.if !defined(NO_BIND_MTREE)
+.if ${MK_BIND_MTREE} != "no"
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
-p ${DESTDIR}/var/named
.endif
-.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
.endif
cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
diff --git a/etc/hosts.allow b/etc/hosts.allow
index 5af0f0e..d8f8c6c 100644
--- a/etc/hosts.allow
+++ b/etc/hosts.allow
@@ -37,7 +37,7 @@ ALL : PARANOID : RFC931 20 : deny
# Allow anything from localhost. Note that an IP address (not a host
# name) *MUST* be specified for rpcbind(8).
ALL : localhost 127.0.0.1 : allow
-# Comment out next line if you build libwrap with NO_INET6=yes.
+# Comment out next line if you build libwrap without IPv6 support.
ALL : [::1] : allow
ALL : my.machine.example.com 192.0.2.35 : allow
diff --git a/etc/mtree/Makefile b/etc/mtree/Makefile
index 10816e4..de69da9 100644
--- a/etc/mtree/Makefile
+++ b/etc/mtree/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
FILES= ${_BIND.chroot.dist} \
${_BIND.include.dist} \
BSD.include.dist \
@@ -10,9 +12,9 @@ FILES= ${_BIND.chroot.dist} \
BSD.x11-4.dist \
BSD.x11.dist
-.if !defined(NO_BIND)
+.if ${MK_BIND} != "no"
_BIND.chroot.dist= BIND.chroot.dist
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
_BIND.include.dist= BIND.include.dist
.endif
.endif
diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile
index 3743975..52a833d 100755
--- a/etc/rc.d/Makefile
+++ b/etc/rc.d/Makefile
@@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $
# $FreeBSD$
+.include <bsd.own.mk>
+
FILES= DAEMON LOGIN NETWORKING SERVERS \
abi accounting addswap adjkerntz amd \
apm apmd archdep atm1 atm2 atm3 auditd \
@@ -41,7 +43,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
ypbind yppasswdd ypserv \
ypset ypupdated ypxfrd
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
FILES+= sshd
.endif
diff --git a/games/factor/Makefile b/games/factor/Makefile
index 62c6f60..da1737c 100644
--- a/games/factor/Makefile
+++ b/games/factor/Makefile
@@ -1,11 +1,13 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= factor
SRCS= factor.c pr_tbl.c
CFLAGS+=-I${.CURDIR}/../primes
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
CFLAGS+=-DHAVE_OPENSSL
DPADD= ${LIBCRYPTO}
LDADD= -lcrypto
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile
index 0e5b51c..9e1584c 100644
--- a/gnu/lib/Makefile
+++ b/gnu/lib/Makefile
@@ -1,18 +1,20 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= csu libgcc libgcov libdialog libregex libreadline
# libsupc++ uses libstdc++ headers, although 'make includes' should
# have taken care of that already.
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
SUBDIR+= libstdc++ libsupc++
.endif
-.if !defined(NO_OBJC)
+.if ${MK_OBJC} != "no"
SUBDIR+= libobjc
.endif
-.if !defined(NO_FORTRAN)
+.if ${MK_FORTRAN} != "no"
SUBDIR+= libg2c
.endif
diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile
index e2e1710..2d725fa 100644
--- a/gnu/lib/libdialog/Makefile
+++ b/gnu/lib/libdialog/Makefile
@@ -1,6 +1,8 @@
# Makefile for libdialog
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= dialog
INCS= dialog.h
MAN= dialog.3
@@ -20,7 +22,7 @@ CFLAGS+= -I${.CURDIR} -Wall -Wstrict-prototypes -DLOCALE
DPADD= ${LIBNCURSES}
LDADD= -lncurses
-.if !defined(NO_HTML)
+.if ${MK_HTML} != "no"
FILES= ${EXAMPLES:C;^;${.CURDIR}/TESTS/;}
FILESDIR= ${SHAREDIR}/examples/libdialog
.endif
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index 9a15f01..1abf8f7 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= bc \
${_binutils} \
${_cc} \
@@ -23,38 +25,38 @@ SUBDIR= bc \
${_texinfo}
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc"
-NO_GDB= # not yet
+MK_GDB= no # not yet
.endif
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
.if ${MACHINE_ARCH} != "powerpc"
_gperf= gperf
.endif
-.if !defined(NO_GROFF)
+.if ${MK_GROFF} != "no"
_groff= groff
.endif
.endif
-.if !defined(NO_CVS)
+.if ${MK_CVS} != "no"
_cvs= cvs
.endif
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
_man= man
.endif
-.if !defined(NO_INFO)
+.if ${MK_INFO} != "no"
_texinfo= texinfo
.endif
-.if !defined(NO_TOOLCHAIN)
+.if ${MK_TOOLCHAIN} != "no"
_binutils= binutils
_cc= cc
-.if !defined(NO_GDB)
+.if ${MK_GDB} != "no"
_gdb= gdb
.endif
.endif
-.if !defined(NO_RCS)
+.if ${MK_RCS} != "no"
_rcs= rcs
.endif
diff --git a/gnu/usr.bin/bc/Makefile b/gnu/usr.bin/bc/Makefile
index ed3838e..74419f2 100644
--- a/gnu/usr.bin/bc/Makefile
+++ b/gnu/usr.bin/bc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BCDIR= ${.CURDIR}/../../../contrib/bc
.PATH: ${BCDIR}/bc ${BCDIR}/lib ${BCDIR}/doc ${BCDIR}/Examples
@@ -11,7 +13,7 @@ CFLAGS+=-DHAVE_CONFIG_H
DPADD= ${LIBREADLINE} ${LIBTERMCAP}
LDADD= -lreadline -ltermcap
-.if !defined (NO_EXAMPLES)
+.if ${MK_EXAMPLES} != "no"
FILES= ckbook.b pi.b primes.b twins.b
FILESDIR= ${SHAREDIR}/examples/bc
.endif
diff --git a/gnu/usr.bin/cc/Makefile b/gnu/usr.bin/cc/Makefile
index d8ea8c2..b1aa973 100644
--- a/gnu/usr.bin/cc/Makefile
+++ b/gnu/usr.bin/cc/Makefile
@@ -1,30 +1,32 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# The order of some of these are rather important. Some depend on previous
# subdirs.
SUBDIR= cc_tools cc_int cc cc1 include protoize doc
-.if !defined(NO_CPP)
+.if ${MK_CPP} != "no"
SUBDIR+= cpp
.endif
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
SUBDIR+= cc1plus c++ c++filt
-.if !defined(NO_COLLECT2)
+.if ${MK_COLLECT2} != "no"
#SUBDIR+= collect2
.endif
.endif
-.if !defined(NO_OBJC)
+.if ${MK_OBJC} != "no"
SUBDIR+= cc1obj
.endif
-.if !defined(NO_FORTRAN)
+.if ${MK_FORTRAN} != "no"
SUBDIR+= f77 f771 f77doc
.endif
-.if !defined(NO_GCOV)
+.if ${MK_GCOV} != "no"
SUBDIR+= gcov
.endif
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index 78bdb69..31da5fb 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
#
# This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk
# is such a !@#!*#% nightmare because of how it reprograms the dependencies,
@@ -197,7 +199,7 @@ CLEANFILES+= gt-*.h gtype-*.h
#-----------------------------------------------------------------------
# Fortran build tools
-.if !defined(NO_FORTRAN)
+.if ${MK_FORTRAN} != "no"
gen-time-stamp: fini
fini: fini.o ${LIBIBERTY}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
@@ -295,15 +297,15 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
#
GTFILES_LANG_DIR_NAMES=
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
GTFILES_LANG_DIR_NAMES+= cp
.endif
-.if !defined(NO_OBJC)
+.if ${MK_OBJC} != "no"
GTFILES_LANG_DIR_NAMES+= objc
.endif
-.if !defined(NO_FORTRAN)
+.if ${MK_FORTRAN} != "no"
GTFILES_LANG_DIR_NAMES+= f
.endif
diff --git a/gnu/usr.bin/cvs/cvs/Makefile b/gnu/usr.bin/cvs/cvs/Makefile
index fa60444..c5e2ff1 100644
--- a/gnu/usr.bin/cvs/cvs/Makefile
+++ b/gnu/usr.bin/cvs/cvs/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
+.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${CVSDIR}/src
@@ -31,7 +32,7 @@ CFLAGS+= -I${.CURDIR} -I../lib -DHAVE_CONFIG_H -I${CVSDIR}/src \
DPADD= ${LIBCVS} ${LIBDIFF} ${LIBGNUREGEX} ${LIBMD} ${LIBCRYPT} ${LIBZ}
LDADD= ${LIBCVS} ${LIBDIFF} -lgnuregex -lmd -lcrypt -lz
-.if !defined(NO_KERBEROS) && !defined(NO_OPENSSL) && !defined(NO_CRYPT)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DHAVE_GSSAPI -DENCRYPTION
LDADD+= -lgssapi -lkrb5 -lasn1 -lcrypto -lroken -lcrypt -lcom_err
DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} ${LIBROKEN}
diff --git a/gnu/usr.bin/dialog/Makefile b/gnu/usr.bin/dialog/Makefile
index 08c0158..8e50ad3 100644
--- a/gnu/usr.bin/dialog/Makefile
+++ b/gnu/usr.bin/dialog/Makefile
@@ -1,7 +1,9 @@
# Makefile for dialog
# $FreeBSD$
-.if !defined (NO_EXAMPLES)
+.include <bsd.own.mk>
+
+.if ${MK_EXAMPLES} != "no"
SUBDIR= TESTS
.endif
diff --git a/include/Makefile b/include/Makefile
index 7045dfd..21df181 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -3,6 +3,8 @@
#
# Doing a "make install" builds /usr/include.
+.include <bsd.own.mk>
+
CLEANFILES= osreldate.h version vers.c
SUBDIR= arpa gssapi protocols rpcsvc rpc
INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
@@ -51,15 +53,15 @@ LSUBDIRS= cam/scsi \
security/mac_mls security/mac_partition \
ufs/ffs ufs/ufs
-.if !defined(NO_GPIB)
+.if ${MK_GPIB} != "no"
_dev_ieee488= dev/ieee488
.endif
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
INCS+= hesiod.h
.endif
-.if !defined(NO_BLUETOOTH)
+.if ${MK_BLUETOOTH} != "no"
LSUBSUBDIRS= netgraph/bluetooth/include
.endif
@@ -115,7 +117,7 @@ compat:
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${.CURDIR}/../etc/mtree/BSD.include.dist \
-p ${DESTDIR}${INCLUDEDIR}
-.if defined(WITH_BIND_LIBS) && !defined(NO_BIND)
+.if ${MK_BIND_LIBS} != "no"
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${.CURDIR}/../etc/mtree/BIND.include.dist \
-p ${DESTDIR}${INCLUDEDIR}
@@ -145,7 +147,7 @@ copies:
cd ${.CURDIR}/../sys/contrib/altq/altq; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/altq
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/netinet
@@ -217,7 +219,7 @@ symlinks:
ln -fs ../../../sys/contrib/altq/altq/$$h \
${DESTDIR}${INCLUDEDIR}/altq; \
done
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \
for h in *.h; do \
ln -fs ../../../sys/contrib/ipfilter/netinet/$$h \
diff --git a/kerberos5/Makefile b/kerberos5/Makefile
index b434526..366540c 100644
--- a/kerberos5/Makefile
+++ b/kerberos5/Makefile
@@ -21,11 +21,11 @@ kerberize:
dekerberize:
.for entry in ${KPROGS}
cd ${.CURDIR}/../${entry}; \
- ${MAKE} -DNO_KERBEROS cleandir; \
- ${MAKE} -DNO_KERBEROS obj; \
- ${MAKE} -DNO_KERBEROS depend; \
- ${MAKE} -DNO_KERBEROS all; \
- ${MAKE} -DNO_KERBEROS install
+ ${MAKE} -DWITHOUT_KERBEROS cleandir; \
+ ${MAKE} -DWITHOUT_KERBEROS obj; \
+ ${MAKE} -DWITHOUT_KERBEROS depend; \
+ ${MAKE} -DWITHOUT_KERBEROS all; \
+ ${MAKE} -DWITHOUT_KERBEROS install
.endfor
.include <bsd.subdir.mk>
diff --git a/lib/Makefile b/lib/Makefile
index 920c339..4c52565 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
# $FreeBSD$
+.include <bsd.own.mk>
+
# To satisfy shared library or ELF linkage when only the libraries being
# built are visible:
#
@@ -44,16 +46,16 @@ _csu=csu/${MACHINE_ARCH}
_csu=csu
.endif
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
_libatm= libatm
_libngatm= libngatm
.endif
-.if !defined(NO_BIND)
+.if ${MK_BIND} != "no"
_bind= bind
.endif
-.if !defined(NO_BLUETOOTH)
+.if ${MK_BLUETOOTH} != "no"
_libbluetooth= libbluetooth
_libsdp= libsdp
.endif
@@ -65,7 +67,7 @@ _libvgl= libvgl
.endif
.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "ia64" && \
- ${MACHINE_ARCH} != "powerpc" && !defined(NO_LIBC_R)
+ ${MACHINE_ARCH} != "powerpc" && ${MK_LIBC_R} != "no"
_libc_r=
.endif
@@ -73,14 +75,14 @@ _libc_r=
_libio= libio
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_libmilter= libmilter
_libsm= libsm
_libsmdb= libsmdb
_libsmutil= libsmutil
.endif
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
_libmp= libmp
.endif
@@ -93,11 +95,11 @@ _libsmb= libsmb
_libsmb= libsmb
.endif
-.if !defined(NO_LIBPTHREAD)
+.if ${MK_LIBPTHREAD} != "no"
_libpthread= libpthread
.endif
-.if !defined(NO_LIBTHR)
+.if ${MK_LIBTHR} != "no"
_libthr= libthr
.endif
@@ -105,15 +107,15 @@ _libthr= libthr
_libthread_db= libthread_db
.endif
-.if !defined(NO_USB)
+.if ${MK_USB} != "no"
_libusbhid= libusbhid
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
_libypclnt= libypclnt
.endif
-.if !defined(NO_GPIB)
+.if ${MK_GPIB} != "no"
_libgpib= libgpib
.endif
diff --git a/lib/bind/bind/Makefile b/lib/bind/bind/Makefile
index 452223b..c10025c 100644
--- a/lib/bind/bind/Makefile
+++ b/lib/bind/bind/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+#.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -62,7 +64,7 @@ SRCS+= herror.c res_comp.c res_data.c \
res_mkquery.c res_mkupdate.c res_query.c \
res_send.c res_sendsigned.c res_update.c
-#.if defined(WITH_BIND_LIBS)
+#.if ${MK_BIND_LIBS} != "no"
#INCS= ${SRCDIR}/include/isc/assertions.h \
# ${SRCDIR}/include/isc/ctl.h \
# ${SRCDIR}/include/isc/dst.h \
diff --git a/lib/bind/bind9/Makefile b/lib/bind/bind9/Makefile
index 3943bb8..68f72d7 100644
--- a/lib/bind/bind9/Makefile
+++ b/lib/bind/bind9/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -14,7 +16,7 @@ SRCS= check.c getaddresses.c version.c
CFLAGS+= -I${SRCDIR}/include
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
INCS= ${SRCDIR}/include/bind9/check.h \
${SRCDIR}/include/bind9/getaddresses.h \
${SRCDIR}/include/bind9/version.h
diff --git a/lib/bind/config.mk b/lib/bind/config.mk
index 15d8122..d89207b 100644
--- a/lib/bind/config.mk
+++ b/lib/bind/config.mk
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# BIND version number
.if defined(BIND_DIR) && exists(${BIND_DIR}/version)
.include "${BIND_DIR}/version"
@@ -15,7 +17,7 @@ CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -DLIBINTERFACE=${LIBINTERFACE}
CFLAGS+= -DLIBREVISION=${LIBREVISION}
CFLAGS+= -DLIBAGE=${LIBAGE}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
SHLIB_MAJOR= ${LIBINTERFACE}
SHLIB_MINOR= ${LIBINTERFACE}
.else
@@ -24,17 +26,17 @@ INTERNALLIB=
.endif
# GSSAPI support is incomplete in 9.3.0
-#.if !defined(NO_KERBEROS)
+#.if ${MK_KERBEROS} != "no"
#CFLAGS+= -DGSSAPI
#.endif
# Enable IPv6 support if available
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DWANT_IPV6
.endif
# Enable crypto if available
-.if !defined(NO_CRYPT)
+.if ${MK_OPENSSL} != "no"
CFLAGS+= -DOPENSSL
.endif
@@ -61,7 +63,7 @@ CFLAGS+= -I${LIB_BIND_DIR}
.endif
# Link against BIND libraries
-.if !defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} == "no"
LIBBIND9= ${LIB_BIND_REL}/bind9/libbind9.a
CFLAGS+= -I${BIND_DIR}/lib/bind9/include
LIBDNS= ${LIB_BIND_REL}/dns/libdns.a
@@ -84,14 +86,14 @@ CFLAGS+= -I${BIND_DIR}/lib/lwres/unix/include \
.endif
BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
${LIBISC} ${LIBLWRES}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
.else
BIND_LDADD= ${BIND_DPADD}
.endif
# Link against crypto library
-.if !defined(NO_CRYPT)
+.if ${MK_OPENSSL} != "no"
CRYPTO_DPADD= ${LIBCRYPTO}
CRYPTO_LDADD= -lcrypto
.endif
diff --git a/lib/bind/dns/Makefile b/lib/bind/dns/Makefile
index 463dba7..04be449 100644
--- a/lib/bind/dns/Makefile
+++ b/lib/bind/dns/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -40,7 +42,7 @@ CFLAGS+= -I${.CURDIR}
DPADD= ${CRYPTO_DPADD}
LDADD= ${CRYPTO_LDADD}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
DNSINCS= ${SRCDIR}/include/dns/acl.h \
${SRCDIR}/include/dns/adb.h \
${SRCDIR}/include/dns/bit.h \
diff --git a/lib/bind/isc/Makefile b/lib/bind/isc/Makefile
index f34f808..0fd8342 100644
--- a/lib/bind/isc/Makefile
+++ b/lib/bind/isc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -38,7 +40,7 @@ SRCS+= inet_pton.c \
CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/nothreads/include
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
INCS= ${SRCDIR}/include/isc/app.h \
${SRCDIR}/include/isc/assertions.h \
${SRCDIR}/include/isc/base64.h \
diff --git a/lib/bind/isccc/Makefile b/lib/bind/isccc/Makefile
index 549afe3..84e1ba8 100644
--- a/lib/bind/isccc/Makefile
+++ b/lib/bind/isccc/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -16,7 +18,7 @@ SRCS= alist.c base64.c cc.c ccmsg.c \
CFLAGS+= -I${SRCDIR}/include
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
INCS= ${SRCDIR}/include/isccc/alist.h \
${SRCDIR}/include/isccc/base64.h \
${SRCDIR}/include/isccc/cc.h \
diff --git a/lib/bind/isccfg/Makefile b/lib/bind/isccfg/Makefile
index 36ccf8b..6c2309c 100644
--- a/lib/bind/isccfg/Makefile
+++ b/lib/bind/isccfg/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
@@ -14,7 +16,7 @@ SRCS= log.c namedconf.c parser.c version.c
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
INCS= ${SRCDIR}/include/isccfg/cfg.h \
${SRCDIR}/include/isccfg/grammar.h \
${SRCDIR}/include/isccfg/log.h \
diff --git a/lib/bind/lwres/Makefile b/lib/bind/lwres/Makefile
index ec06a27..eef4589 100644
--- a/lib/bind/lwres/Makefile
+++ b/lib/bind/lwres/Makefile
@@ -1,13 +1,15 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/lwres
# Unlike other BIND libs, this should be installed unless the user says NO.
-.if !defined(NO_BIND_LIBS_LWRES)
-WITH_BIND_LIBS=
+.if ${MK_BIND_LIBS_LWRES} != "no"
+MK_BIND_LIBS= yes
.endif
.include "${LIB_BIND_DIR}/config.mk"
@@ -24,7 +26,7 @@ SRCS+= context.c gai_strerror.c getaddrinfo.c gethost.c \
CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include
CFLAGS+= -I${.CURDIR}
-.if defined(WITH_BIND_LIBS)
+.if ${MK_BIND_LIBS} != "no"
MAN= lwres.3 lwres_buffer.3 lwres_config.3 lwres_context.3 \
lwres_gabn.3 lwres_gai_strerror.3 lwres_getaddrinfo.3 \
lwres_gethostent.3 lwres_getipnode.3 lwres_getnameinfo.3 \
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index bfbfc33..70d48c9 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 2/3/94
# $FreeBSD$
-#
+
+.include <bsd.own.mk>
+
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
@@ -55,14 +57,14 @@ NOASM=
.if ${MACHINE_ARCH} == "arm"
.include "${.CURDIR}/softfloat/Makefile.inc"
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.include "${.CURDIR}/yp/Makefile.inc"
.endif
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
CFLAGS+= -DHESIOD
.endif
-.if defined(NO_FP_LIBC)
+.if ${MK_FP_LIBC} == "no"
CFLAGS+= -DNO_FLOATING_POINT
.endif
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
index a176123..8a8a381 100644
--- a/lib/libc/net/Makefile.inc
+++ b/lib/libc/net/Makefile.inc
@@ -115,7 +115,7 @@ MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \
resolver.3 ns_get16.3 resolver.3 ns_get32.3 \
resolver.3 ns_put16.3 resolver.3 ns_put32.3
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
SRCS+= hesiod.c
MAN+= hesiod.3
.endif
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index 6082f6a..8dd31b4 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -2,6 +2,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
SHLIB_MAJOR= 3
LIB= crypt
SHLIBDIR?= /lib
@@ -15,7 +17,7 @@ MLINKS= crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
CFLAGS+= -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
# Pull in the strong crypto, if it is present.
-.if exists(${.CURDIR}/../../secure/lib/libcrypt) && !defined(NO_CRYPT)
+.if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no"
.PATH: ${.CURDIR}/../../secure/lib/libcrypt
SRCS+= crypt-des.c crypt-blowfish.c blowfish.c
CFLAGS+= -I${.CURDIR} -DHAS_DES -DHAS_BLOWFISH
diff --git a/lib/libfetch/Makefile b/lib/libfetch/Makefile
index 1b69c49..bcd5214 100644
--- a/lib/libfetch/Makefile
+++ b/lib/libfetch/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= fetch
CFLAGS+= -I.
CFLAGS+= -DINET6
@@ -9,7 +11,7 @@ INCS= fetch.h
MAN= fetch.3
CLEANFILES= ftperr.h httperr.h
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_SSL
DPADD= ${LIBSSL} ${LIBCRYPTO}
LDADD= -lssl -lcrypto
diff --git a/lib/libipsec/Makefile b/lib/libipsec/Makefile
index 2a60d93..542310c 100644
--- a/lib/libipsec/Makefile
+++ b/lib/libipsec/Makefile
@@ -27,12 +27,14 @@
#
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= ipsec
SHLIBDIR?= /lib
SHLIB_MAJOR= 2
CFLAGS+=-I. -I${.CURDIR}
CFLAGS+=-DIPSEC_DEBUG -DIPSEC
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile
index 41db418..9ce6bcf 100644
--- a/lib/libmilter/Makefile
+++ b/lib/libmilter/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
.PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm
@@ -7,7 +9,7 @@ CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
CFLAGS+=-DNOT_SENDMAIL -Dsm_snprintf=snprintf
CFLAGS+=-D_THREAD_SAFE
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DNETINET6
.endif
diff --git a/lib/libncurses/Makefile b/lib/libncurses/Makefile
index d372af0..aa541ea 100644
--- a/lib/libncurses/Makefile
+++ b/lib/libncurses/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
NCURSES=${.CURDIR}/../../contrib/ncurses
LIB= ncurses
@@ -253,7 +255,7 @@ SYMLINKS+=libncurses_p.a ${LIBDIR}/libtinfo_p.a
DOCSDIR= /usr/share/doc/ncurses
DOCS= ncurses-intro.html hackguide.html
-.if !defined(NO_HTML)
+.if ${MK_HTML} != "no"
.PATH: ${NCURSES}/doc/html
FILESGROUPS= DOCS
.endif
diff --git a/lib/libpam/modules/modules.inc b/lib/libpam/modules/modules.inc
index c721075..c570cfd 100644
--- a/lib/libpam/modules/modules.inc
+++ b/lib/libpam/modules/modules.inc
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
MODULES =
MODULES += pam_chroot
MODULES += pam_deny
@@ -8,7 +10,7 @@ MODULES += pam_exec
MODULES += pam_ftpusers
MODULES += pam_group
MODULES += pam_guest
-.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_KERBEROS} != "no"
MODULES += pam_krb5
MODULES += pam_ksu
.endif
@@ -24,7 +26,7 @@ MODULES += pam_rhosts
MODULES += pam_rootok
MODULES += pam_securetty
MODULES += pam_self
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
MODULES += pam_ssh
.endif
MODULES += pam_tacplus
diff --git a/lib/libpam/modules/pam_unix/Makefile b/lib/libpam/modules/pam_unix/Makefile
index fde40fe..385cb9c 100644
--- a/lib/libpam/modules/pam_unix/Makefile
+++ b/lib/libpam/modules/pam_unix/Makefile
@@ -34,6 +34,8 @@
#
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= pam_unix
SRCS= pam_unix.c
MAN= pam_unix.8
@@ -41,7 +43,7 @@ MAN= pam_unix.8
DPADD= ${LIBUTIL} ${LIBCRYPT}
LDADD= -lutil -lcrypt
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
DPADD+= ${LIBYPCLNT}
LDADD+= -lypclnt
diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile
index ec4c9fd..8f95ddd 100644
--- a/lib/libpcap/Makefile
+++ b/lib/libpcap/Makefile
@@ -1,6 +1,8 @@
# Makefile for libpcap
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= pcap
SRCS= grammar.y tokdefs.h version.h pcap-bpf.c \
pcap.c inet.c fad-getad.c gencode.c optimize.c nametoaddr.c \
@@ -15,7 +17,7 @@ LFLAGS+=-Ppcapyy
CFLAGS+=-DHAVE_CONFIG_H -Dyylval=pcapyylval -I${.CURDIR} -I.
CFLAGS+=-D_U_="__attribute__((unused))"
CFLAGS+=-DHAVE_SNPRINTF -DHAVE_VSNPRINTF
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/lib/libradius/Makefile b/lib/libradius/Makefile
index 2c89597..4102e1b 100644
--- a/lib/libradius/Makefile
+++ b/lib/libradius/Makefile
@@ -24,6 +24,8 @@
#
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= radius
SRCS= radlib.c
INCS= radlib.h radlib_vs.h
@@ -31,7 +33,7 @@ CFLAGS+= -Wall
SHLIB_MAJOR= 2
MAN= libradius.3 radius.conf.5
-.if defined(NO_CRYPT) || defined(NO_OPENSSL)
+.if ${MK_OPENSSL} == "no"
DPADD= ${LIBMD}
LDADD= -lmd
.else
diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile
index 6ced099..3939a6a 100644
--- a/lib/librpcsvc/Makefile
+++ b/lib/librpcsvc/Makefile
@@ -1,6 +1,8 @@
# from: @(#)Makefile 5.10 (Berkeley) 6/24/90
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../include/rpcsvc
LIB= rpcsvc
@@ -12,7 +14,7 @@ RPCSRCS= klm_prot.x mount.x nfs_prot.x nlm_prot.x rex.x rnusers.x \
OTHERSRCS= rnusers.c rstat.c rwall.c
SECRPCSRCS= secretkey.c xcrypt.c
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
OTHERSRCS+= yp_passwd.c yp_update.c
.endif
diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile
index 12a73d7..4439b4a 100644
--- a/lib/libsm/Makefile
+++ b/lib/libsm/Makefile
@@ -1,12 +1,14 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
.PATH: ${SENDMAIL_DIR}/libsm
CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DNETINET6
.endif
diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile
index 38f73a4..eda86aa 100644
--- a/lib/libtelnet/Makefile
+++ b/lib/libtelnet/Makefile
@@ -1,6 +1,8 @@
# From: @(#)Makefile 8.2 (Berkeley) 12/15/93
# $FreeBSD$
+.include <bsd.own.mk>
+
TELNETDIR= ${.CURDIR}/../../contrib/telnet
.PATH: ${TELNETDIR}/libtelnet
@@ -14,10 +16,10 @@ CFLAGS+= -I${TELNETDIR}
WARNS?= 0
.if !defined(RELEASE_CRUNCH)
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SRCS+= encrypt.c auth.c enc_des.c sra.c pk.c
CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DSRA
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
SRCS+= kerberos5.c
CFLAGS+= -DKRB5 -I${KRB5DIR}/lib/krb5 -I${KRB5OBJDIR} -I${ASN1OBJDIR}
CFLAGS+= -DFORWARD -Dnet_write=telnet_net_write
diff --git a/lib/libwrap/Makefile b/lib/libwrap/Makefile
index 1f3ccd0..c477b38 100644
--- a/lib/libwrap/Makefile
+++ b/lib/libwrap/Makefile
@@ -2,6 +2,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
LIB= wrap
SHLIB_MAJOR= 4
INCS= tcpd.h
@@ -17,10 +19,10 @@ CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \
-DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \
-DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \
-DSYS_ERRLIST_DEFINED -DALWAYS_HOSTNAME -DUSE_STRSEP -DPROCESS_OPTIONS
-.if defined(NO_NIS)
+.if ${MK_NIS} == "no"
CFLAGS+= -DUSE_GETDOMAIN
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index d372af0..aa541ea 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
NCURSES=${.CURDIR}/../../contrib/ncurses
LIB= ncurses
@@ -253,7 +255,7 @@ SYMLINKS+=libncurses_p.a ${LIBDIR}/libtinfo_p.a
DOCSDIR= /usr/share/doc/ncurses
DOCS= ncurses-intro.html hackguide.html
-.if !defined(NO_HTML)
+.if ${MK_HTML} != "no"
.PATH: ${NCURSES}/doc/html
FILESGROUPS= DOCS
.endif
diff --git a/libexec/Makefile b/libexec/Makefile
index 30a8db1..6d25b58 100644
--- a/libexec/Makefile
+++ b/libexec/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 6/4/93
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= atrun \
bootpd \
comsat \
@@ -32,12 +34,12 @@ SUBDIR= atrun \
tftpd \
${_ypxfr}
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
_mknetid= mknetid
_ypxfr= ypxfr
.endif
-.if !defined(NO_PF)
+.if ${MK_PF} != "no"
_ftp-proxy= ftp-proxy
.endif
@@ -45,12 +47,12 @@ _ftp-proxy= ftp-proxy
_rtld-elf= rtld-elf
.endif
-.if !defined(NO_RCMDS)
+.if ${MK_RCMDS} != "no"
_rlogind= rlogind
_rshd= rshd
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_mail.local= mail.local
_smrsh= smrsh
.endif
diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile
index c4275e4..ceb46e2 100644
--- a/libexec/ftpd/Makefile
+++ b/libexec/ftpd/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 4/4/94
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ftpd
MAN= ftpd.8 ftpchroot.5
SRCS= ftpd.c ftpcmd.y logwtmp.c popen.c
@@ -26,7 +28,7 @@ CFLAGS+=-Dmain=ls_main -I${.CURDIR}/${LSDIR}
DPADD+= ${LIBM}
LDADD+= -lm
-.if !defined(NO_PAM)
+.if ${MK_PAM_SUPPORT} != "no"
CFLAGS+=-DUSE_PAM
DPADD+= ${LIBPAM}
LDADD+= ${MINUSLPAM}
diff --git a/libexec/lukemftpd/Makefile b/libexec/lukemftpd/Makefile
index 532f85c..7f78379 100644
--- a/libexec/lukemftpd/Makefile
+++ b/libexec/lukemftpd/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 4/4/94
# $FreeBSD$
+.include <bsd.own.mk>
+
LUKEMFTPD= ${.CURDIR}/../../contrib/lukemftpd
.PATH: ${LUKEMFTPD}/src ${LUKEMFTPD}/libnetbsd
@@ -30,7 +32,7 @@ CFLAGS+= -DUSE_OPIE -DLOGIN_CAP
DPADD+= ${LIBOPIE} ${LIBMD}
LDADD+= -lopie -lmd
-.if !defined(NO_PAM)
+.if ${MK_PAM_SUPPORT} != "no"
CFLAGS+= -DUSE_PAM
DPADD+= ${LIBPAM}
LDADD+= ${MINUSLPAM}
diff --git a/libexec/tcpd/Makefile b/libexec/tcpd/Makefile
index 6a8f0e2..6bb6080 100644
--- a/libexec/tcpd/Makefile
+++ b/libexec/tcpd/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
PROG= tcpd
@@ -9,7 +11,7 @@ CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \
-DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \
-DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \
-DFACILITY=LOG_DAEMON
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile
index 68b2be6..11f4b0c 100644
--- a/libexec/telnetd/Makefile
+++ b/libexec/telnetd/Makefile
@@ -3,6 +3,8 @@
# Do not define -DKLUDGELINEMODE, as it does not interact well with many
# telnet implementations.
+.include <bsd.own.mk>
+
TELNETDIR= ${.CURDIR}/../../contrib/telnet
.PATH: ${TELNETDIR}/telnetd
@@ -25,12 +27,12 @@ DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
LDADD= -lutil -ltermcap ${LIBTELNET}
.if !defined(RELEASE_CRUNCH)
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SRCS+= authenc.c
CFLAGS+= -DAUTHENTICATION -DENCRYPTION
DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBPAM}
LDADD+= -lmp -lcrypto -lcrypt ${MINUSLPAM}
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write
DPADD+= ${LIBKRB5} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR}
LDADD+= -lkrb5 -lasn1 -lroken -lcom_err
diff --git a/release/Makefile b/release/Makefile
index 46ba2bf..7a7bc7b 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -375,8 +375,8 @@ release rerelease:
.endif
mkdir -p ${CHROOTDIR}
@echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`"
- cd ${WORLDDIR} && ${NATIVEMAKE} -DNO_GAMES -DNO_HTML -DNO_LIB32 \
- -DNO_MAN -DNO_NLS -DNO_PROFILE installworld DESTDIR=${CHROOTDIR}
+ cd ${WORLDDIR} && ${NATIVEMAKE} -DWITHOUT_GAMES -DWITHOUT_HTML -DNO_LIB32 \
+ -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE installworld DESTDIR=${CHROOTDIR}
cd ${WORLDDIR} && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR}
if [ -f /etc/resolv.conf ]; then \
cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
diff --git a/release/picobsd/tinyware/login/Makefile b/release/picobsd/tinyware/login/Makefile
index 1f622f6..01e01bb 100644
--- a/release/picobsd/tinyware/login/Makefile
+++ b/release/picobsd/tinyware/login/Makefile
@@ -1,6 +1,8 @@
# From: @(#)Makefile 8.1 (Berkeley) 7/19/93
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../../usr.bin/login
PROG= login
@@ -12,7 +14,7 @@ CFLAGS+=-DLOGIN_ACCESS -DLOGALL
DPADD= ${LIBUTIL} ${LIBCRYPT}
LDADD= -lutil -lcrypt
-.if !defined(NO_PAM)
+.if ${MK_PAM_SUPPORT} != "no"
CFLAGS+= -DUSE_PAM
DPADD+= ${LIBPAM}
LDADD+= ${MINUSLPAM}
diff --git a/rescue/librescue/Makefile b/rescue/librescue/Makefile
index 0cc5bfa..daa1ff5 100644
--- a/rescue/librescue/Makefile
+++ b/rescue/librescue/Makefile
@@ -2,6 +2,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
# Certain library entries have hard-coded references to
# /bin, /sbin, etc, that require those entries to be
# recompiled for use in /rescue. This Makefile
@@ -30,10 +32,10 @@ CFLAGS+= -DPOSIX_MISTAKE
# libc/rpc/Makefile.inc
CFLAGS+= -DBROKEN_DES -DPORTMAP -DDES_BUILTIN
# libc/Makefile
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
CFLAGS+= -DHESIOD
.endif
CFLAGS+= -I${.CURDIR}/../../lib/libc/include
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 43b38d0..44e29ab 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -1,6 +1,10 @@
#$FreeBSD$
# @(#)Makefile 8.1 (Berkeley) 6/2/93
+NO_MAN=
+
+.include <bsd.own.mk>
+
PROG= rescue
BINDIR?=/rescue
@@ -68,7 +72,7 @@ CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \
ed expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd \
realpath rm rmdir setfacl sh stty sync test
CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -lm -ltermcap -lutil
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif
@@ -81,11 +85,11 @@ CRUNCH_ALIAS_ln= link
CRUNCH_ALIAS_rm= unlink
CRUNCH_ALIAS_ed= red
-.if !defined(NO_RCMDS)
+.if ${MK_RCMDS} != "no"
CRUNCH_PROGS_bin+= rcp
.endif
-.if !defined(NO_TCSH)
+.if ${MK_TCSH} != "no"
CRUNCH_PROGS_bin+= csh
CRUNCH_ALIAS_csh= -csh tcsh -tcsh
CRUNCH_SUPPRESS_LINK_-csh= 1
@@ -114,16 +118,16 @@ CRUNCH_PROGS_sbin= atacontrol badsect bsdlabel \
restore rcorder route routed rtquery rtsol savecore \
slattach spppcontrol startslip swapon sysctl tunefs umount
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
CRUNCH_PROGS_sbin+= atm atmconfig fore_dnld ilmid
CRUNCH_LIBS+= -latm
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CRUNCH_PROGS_sbin+= ping6
.endif
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
CRUNCH_PROGS_sbin+= ipf
.endif
@@ -221,7 +225,6 @@ CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR}
CANONICALOBJDIR:= /usr/obj${.CURDIR}
.endif
-NO_MAN=
CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h
# Program names and their aliases contribute hardlinks to 'rescue' executable,
diff --git a/sbin/Makefile b/sbin/Makefile
index bf43850..a2daff4 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.5 (Berkeley) 3/31/94
# $FreeBSD$
+.include <bsd.own.mk>
+
# XXX MISSING: icheck ncheck
SUBDIR= adjkerntz \
@@ -92,24 +94,24 @@ SUBDIR= adjkerntz \
tunefs \
umount \
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
_atm= atm
.endif
-.if !defined(NO_CXX)
+.if ${MK_CXX} != "no"
_devd= devd
.endif
-.if !defined(NO_IPFILTER)
+.if ${MK_IPFILTER} != "no"
_ipf= ipf
.endif
-.if !defined(NO_PF)
+.if ${MK_PF} != "no"
_pfctl= pfctl
_pflogd= pflogd
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6} != "no"
_ip6fw= ip6fw
_ping6= ping6
.endif
diff --git a/sbin/Makefile.inc b/sbin/Makefile.inc
index d1fed26..70d6584 100644
--- a/sbin/Makefile.inc
+++ b/sbin/Makefile.inc
@@ -1,9 +1,11 @@
# @(#)Makefile.inc 8.1 (Berkeley) 6/8/93
# $FreeBSD$
+.include <bsd.own.mk>
+
BINDIR?= /sbin
WARNS?= 2
-.if defined(NO_DYNAMICROOT)
+.if ${MK_DYNAMICROOT} == "no"
NO_SHARED?= YES
.endif
diff --git a/sbin/geom/class/Makefile b/sbin/geom/class/Makefile
index e172bbf..6ebdc66 100644
--- a/sbin/geom/class/Makefile
+++ b/sbin/geom/class/Makefile
@@ -1,7 +1,9 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= concat
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SUBDIR+=eli
.endif
SUBDIR+=label
diff --git a/sbin/ggate/Makefile b/sbin/ggate/Makefile
index 97094d6..03ef1ba 100644
--- a/sbin/ggate/Makefile
+++ b/sbin/ggate/Makefile
@@ -1,10 +1,12 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= ${_ggatec} \
${_ggated} \
ggatel
-.if !defined(NO_LIBPTHREAD)
+.if ${MK_LIBPTHREAD} != "no"
_ggatec= ggatec
_ggated= ggated
.endif
diff --git a/secure/Makefile b/secure/Makefile
index c6d2ff4..7a78d94 100644
--- a/secure/Makefile
+++ b/secure/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= lib libexec usr.bin usr.sbin
# These are the programs which depend on crypto, but not Kerberos.
@@ -7,7 +9,7 @@ SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \
bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \
usr.sbin/pkg_install usr.sbin/ppp usr.sbin/pppd \
usr.sbin/tcpdump/tcpdump
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
SPROGS+=usr.sbin/sendmail
.endif
@@ -26,11 +28,11 @@ secure:
insecure:
.for entry in ${SPROGS}
cd ${.CURDIR}/../${entry}; \
- ${MAKE} -DNO_CRYPT cleandir; \
- ${MAKE} -DNO_CRYPT obj; \
- ${MAKE} -DNO_CRYPT depend; \
- ${MAKE} -DNO_CRYPT all; \
- ${MAKE} -DNO_CRYPT install
+ ${MAKE} -DWITHOUT_CRYPT cleandir; \
+ ${MAKE} -DWITHOUT_CRYPT obj; \
+ ${MAKE} -DWITHOUT_CRYPT depend; \
+ ${MAKE} -DWITHOUT_CRYPT all; \
+ ${MAKE} -DWITHOUT_CRYPT install
.endfor
.include <bsd.subdir.mk>
diff --git a/secure/Makefile.inc b/secure/Makefile.inc
index 346c0ee..7b9cb98 100644
--- a/secure/Makefile.inc
+++ b/secure/Makefile.inc
@@ -1,15 +1,17 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.if exists(${.CURDIR}/../../lib/libcrypt/obj)
CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj
.else
CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt
.endif
-.if !defined(MAKE_IDEA)
+.if ${MK_IDEA} == "no"
CFLAGS+= -DNO_IDEA
.endif
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
SSHDIR= ${.CURDIR}/../../../crypto/openssh
.endif
diff --git a/secure/lib/Makefile b/secure/lib/Makefile
index 049fd39..e27bcc3 100644
--- a/secure/lib/Makefile
+++ b/secure/lib/Makefile
@@ -1,9 +1,11 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR=
-.if !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SUBDIR+=libcrypto libssl
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
SUBDIR+=libssh
.endif
.endif
diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile
index 5c22f97..8dbd0e5 100644
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= crypto
SHLIBDIR?= /lib
SHLIB_MAJOR= 4
@@ -164,7 +166,7 @@ SRCS+= hmac.c
INCS+= hmac.h
# idea
-.if defined(MAKE_IDEA)
+.if ${MK_IDEA} != "no"
SRCS+= i_cbc.c i_cfb64.c i_ecb.c i_ofb64.c i_skey.c
INCS+= idea.h
.endif
@@ -313,7 +315,7 @@ opensslconf.h: opensslconf-${MACHINE_ARCH}.h
cp ${.ALLSRC} ${.TARGET}
evp.h: ${LCRYPTO_SRC}/crypto/evp/evp.h
-.if !defined(MAKE_IDEA)
+.if ${MK_IDEA} == "no"
sed '/^#ifndef OPENSSL_NO_IDEA$$/,/^#endif$$/d' ${.ALLSRC} > ${.TARGET}
.else
cp ${.ALLSRC} ${.TARGET}
@@ -344,7 +346,7 @@ afterinstall:
_bn_asmpath= ${LCRYPTO_SRC}/crypto/bn/asm
.endif
-.if defined(MAKE_IDEA)
+.if ${MK_IDEA} != "no"
_ideapath= ${LCRYPTO_SRC}/crypto/idea
.endif
diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc
index 82ace34..5562062 100644
--- a/secure/lib/libcrypto/Makefile.inc
+++ b/secure/lib/libcrypto/Makefile.inc
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl
LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc
@@ -7,7 +9,7 @@ CFLAGS+= -DTERMIOS -DANSI_SOURCE
CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR}
CFLAGS+= -DOPENSSL_THREADS
-.if !defined(MAKE_IDEA)
+.if ${MK_IDEA} == "no"
CFLAGS+= -DOPENSSL_NO_IDEA
.endif
diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index ddd6b5c..6a4231d 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LIB= ssh
SHLIB_MAJOR= 3
SRCS= acss.c authfd.c authfile.c bufaux.c buffer.c \
@@ -30,7 +32,7 @@ CFLAGS+= -I${SSHDIR}
DPADD= ${LIBZ}
LDADD= -lz
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN}
LDADD+= -lgssapi -lkrb5 -lasn1 -lcom_err -lmd -lroken
diff --git a/secure/libexec/Makefile b/secure/libexec/Makefile
index b60b4ce..1c3ee01 100644
--- a/secure/libexec/Makefile
+++ b/secure/libexec/Makefile
@@ -1,10 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR=
-.if !defined(NO_OPENSSL)
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
SUBDIR+=sftp-server ssh-keysign
.endif
-.endif
.include <bsd.subdir.mk>
diff --git a/secure/usr.bin/Makefile b/secure/usr.bin/Makefile
index 4d78845..b10a43b 100644
--- a/secure/usr.bin/Makefile
+++ b/secure/usr.bin/Makefile
@@ -1,9 +1,11 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR=
-.if !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SUBDIR+=bdes openssl
-.if !defined(NO_OPENSSH)
+.if ${MK_OPENSSH} != "no"
SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan
.endif
.endif
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index 9d1e0b5..43ade12 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
PROG= ssh
CFLAGS+=-I${SSHDIR}
LINKS= ${BINDIR}/ssh ${BINDIR}/slogin
@@ -14,7 +16,7 @@ SRCS= ssh.c readconf.c clientloop.c sshtty.c \
DPADD= ${LIBSSH} ${LIBUTIL} ${LIBZ}
LDADD= -lssh -lutil -lz
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
DPADD+= ${LIBGSSAPI}
LDADD+= -lgssapi
diff --git a/secure/usr.sbin/Makefile b/secure/usr.sbin/Makefile
index b8636e5..e08025c 100644
--- a/secure/usr.sbin/Makefile
+++ b/secure/usr.sbin/Makefile
@@ -1,7 +1,9 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR=
-.if !defined(NO_OPENSSH) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSH} != "no"
SUBDIR+=sshd
.endif
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index 0e23288..7567505 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
PROG= sshd
SRCS= sshd.c auth-rhosts.c auth-passwd.c auth-rsa.c auth-rh-rsa.c \
sshpty.c sshlogin.c servconf.c serverloop.c \
@@ -23,13 +25,13 @@ CFLAGS+=-I${SSHDIR}
DPADD= ${LIBSSH} ${LIBUTIL} ${LIBZ} ${LIBWRAP} ${LIBPAM}
LDADD= -lssh -lutil -lz -lwrap ${MINUSLPAM}
-.if !defined(NO_AUDIT)
+.if ${MK_AUDIT} != "no"
CFLAGS+= -DUSE_BSM_AUDIT
DPADD+= ${LIBBSM}
LDADD+= -lbsm
.endif
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
LDADD+= -lgssapi -lkrb5 -lasn1 -lcom_err -lroken
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
diff --git a/sys/Makefile b/sys/Makefile
index 4fd38d6..24c6126 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -1,7 +1,9 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# The boot loader
-.if !defined(NO_BOOT)
+.if ${MK_BOOT} != "no"
.if ${MACHINE_ARCH} != "arm"
SUBDIR= boot
.endif
diff --git a/sys/boot/Makefile b/sys/boot/Makefile
index d9b9e50..975f03c 100644
--- a/sys/boot/Makefile
+++ b/sys/boot/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
-.if !defined(NO_FORTH)
+.include <bsd.own.mk>
+
+.if ${MK_FORTH} != "no"
# Build the add-in FORTH interpreter.
SUBDIR+= ficl
.endif
diff --git a/sys/boot/alpha/common/Makefile.common b/sys/boot/alpha/common/Makefile.common
index bbe9099..9523188 100644
--- a/sys/boot/alpha/common/Makefile.common
+++ b/sys/boot/alpha/common/Makefile.common
@@ -2,6 +2,8 @@
#
# Common Alpha loader build rules
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../common
PROG= ${BOOT}.sym
@@ -15,7 +17,7 @@ SRCS+= dev_net.c
.PATH: ${.CURDIR}/../libalpha
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH
diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile
index ad23397..6b260fa 100644
--- a/sys/boot/i386/loader/Makefile
+++ b/sys/boot/i386/loader/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= loader.sym
INTERNALPROG=
NEWVERSWHAT= "bootstrap loader" i386
@@ -18,7 +20,7 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
HAVE_PNP= yes
HAVE_ISABUS= yes
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
diff --git a/sys/boot/ia64/efi/Makefile b/sys/boot/ia64/efi/Makefile
index 6524992..f5fed73 100644
--- a/sys/boot/ia64/efi/Makefile
+++ b/sys/boot/ia64/efi/Makefile
@@ -1,9 +1,12 @@
# $FreeBSD$
+NO_MAN=
+
+.include <bsd.own.mk>
+
PROG= loader.sym
INTERNALPROG=
SRCS= conf.c dev_net.c efimd.c main.c start.S vers.c
-NO_MAN=
CFLAGS+= -DLOADER
CFLAGS+= -I${.CURDIR}/../../efi/include
@@ -11,7 +14,7 @@ CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../efi/libefi
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -I${.CURDIR}/../../ficl
diff --git a/sys/boot/ia64/ski/Makefile b/sys/boot/ia64/ski/Makefile
index c6b8a17..84b06dc 100644
--- a/sys/boot/ia64/ski/Makefile
+++ b/sys/boot/ia64/ski/Makefile
@@ -1,7 +1,10 @@
# $FreeBSD$
-PROG= skiload
NO_MAN=
+
+.include <bsd.own.mk>
+
+PROG= skiload
NEWVERSWHAT= "ia64 SKI boot" ${MACHINE_ARCH}
STRIP= # We must not strip skiload at install time.
@@ -16,7 +19,7 @@ CFLAGS+= -I${.CURDIR}/../../efi/include
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
LDFLAGS= -Wl,-T${.CURDIR}/ldscript.ia64
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -I${.CURDIR}/../../ficl
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
diff --git a/sys/boot/pc98/loader/Makefile b/sys/boot/pc98/loader/Makefile
index 9085690..53ec657 100644
--- a/sys/boot/pc98/loader/Makefile
+++ b/sys/boot/pc98/loader/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= loader.sym
INTERNALPROG=
NEWVERSWHAT= "bootstrap loader" pc98
@@ -19,7 +21,7 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
HAVE_PNP= yes
HAVE_ISABUS= yes
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
diff --git a/sys/boot/powerpc/loader/Makefile b/sys/boot/powerpc/loader/Makefile
index c409729..eccec93 100644
--- a/sys/boot/powerpc/loader/Makefile
+++ b/sys/boot/powerpc/loader/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= loader
NEWVERSWHAT= "bootstrap loader" "Open Firmware/PowerPC"
BINDIR?= /boot
@@ -46,7 +48,7 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
CFLAGS+= -DLOADER_TFTP_SUPPORT
.endif
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile
index c409729..eccec93 100644
--- a/sys/boot/powerpc/ofw/Makefile
+++ b/sys/boot/powerpc/ofw/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= loader
NEWVERSWHAT= "bootstrap loader" "Open Firmware/PowerPC"
BINDIR?= /boot
@@ -46,7 +48,7 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
CFLAGS+= -DLOADER_TFTP_SUPPORT
.endif
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index c8a423d..784ab92 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= loader
NEWVERSWHAT= "bootstrap loader" sparc64
INSTALLFLAGS= -b
@@ -41,7 +43,7 @@ CFLAGS+= -DLOADER_NFS_SUPPORT
CFLAGS+= -DLOADER_TFTP_SUPPORT
.endif
-.if !defined(NO_FORTH)
+.if ${MK_FORTH} != "no"
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/sparc64
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index f17210d..6a6c475 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= ${_3dfx} \
${_3dfx_linux} \
${_aac} \
@@ -295,7 +297,7 @@ _vpo= vpo
_ufs= ufs
.endif
-.if !defined(NO_CRYPT) || defined(ALL_MODULES)
+.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
.if exists(${.CURDIR}/../opencrypto)
_crypto= crypto
_cryptodev= cryptodev
@@ -305,11 +307,11 @@ _random= random
.endif
.endif
-.if !defined(NO_IPFILTER) || defined(ALL_MODULES)
+.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
_ipfilter= ipfilter
.endif
-.if !defined(NO_PF) || defined(ALL_MODULES)
+.if ${MK_PF} != "no" || defined(ALL_MODULES)
_pf= pf
_pflog= pflog
.endif
@@ -407,7 +409,7 @@ _ipw= ipw
_iwi= iwi
_mly= mly
_nve= nve
-.if !defined(NO_CRYPT) || defined(ALL_MODULES)
+.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
.if exists(${.CURDIR}/../crypto/via)
_padlock= padlock
.endif
diff --git a/sys/modules/dummynet/Makefile b/sys/modules/dummynet/Makefile
index ecd6cbe..5da69b2 100644
--- a/sys/modules/dummynet/Makefile
+++ b/sys/modules/dummynet/Makefile
@@ -1,12 +1,14 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../netinet
KMOD= dummynet
SRCS= ip_dummynet.c
SRCS+= opt_inet6.h
.if !defined(KERNBUILDDIR)
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
diff --git a/sys/modules/if_bridge/Makefile b/sys/modules/if_bridge/Makefile
index fa47a76..d1fc350 100644
--- a/sys/modules/if_bridge/Makefile
+++ b/sys/modules/if_bridge/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../net
KMOD= if_bridge
SRCS= if_bridge.c bridgestp.c opt_inet.h opt_inet6.h
@@ -8,7 +10,7 @@ SRCS= if_bridge.c bridgestp.c opt_inet.h opt_inet6.h
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile
index c9d073b..b608f55 100644
--- a/sys/modules/if_gif/Makefile
+++ b/sys/modules/if_gif/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6
KMOD= if_gif
@@ -10,7 +12,7 @@ SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mac.h \
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
@@ -20,11 +22,11 @@ opt_mrouting.h:
.else
OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h
.if empty(OPT_INET6)
-NO_INET6=
+MK_INET6_SUPPORT= no
.endif
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
SRCS+= in6_gif.c
.endif
diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile
index 542af84..9cfb0f6 100644
--- a/sys/modules/ipfilter/Makefile
+++ b/sys/modules/ipfilter/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/ipfilter/netinet
KMOD= ipl
@@ -12,7 +14,7 @@ SRCS+= opt_bpf.h opt_inet6.h
opt_bpf.h:
echo "#define DEV_BPF 1" > ${.TARGET}
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile
index 5c433e2..3a305f9 100644
--- a/sys/modules/ipfw/Makefile
+++ b/sys/modules/ipfw/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../netinet
KMOD= ipfw
@@ -17,7 +19,7 @@ CFLAGS+= -DIPFIREWALL
#
.if !defined(KERNBUILDDIR)
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
diff --git a/sys/modules/netgraph/Makefile b/sys/modules/netgraph/Makefile
index b2b6af4..6bf4cc4 100644
--- a/sys/modules/netgraph/Makefile
+++ b/sys/modules/netgraph/Makefile
@@ -1,6 +1,8 @@
# $Whistle: Makefile,v 1.5 1999/01/24 06:48:37 archie Exp $
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= async \
atm \
atmllc \
@@ -52,11 +54,11 @@ _sync_ar= sync_ar
_sync_sr= sync_sr
.endif
-.if !defined(NO_BLUETOOTH) || defined(ALL_MODULES)
+.if ${MK_BLUETOOTH} != "no" || defined(ALL_MODULES)
_bluetooth= bluetooth
.endif
-.if !defined(NO_CRYPT) && exists(${.CURDIR}/../../crypto/rc4/rc4.c)
+.if ${MK_CRYPT} != "no" && exists(${.CURDIR}/../../crypto/rc4/rc4.c)
_mppc= mppc
.endif
diff --git a/sys/modules/pf/Makefile b/sys/modules/pf/Makefile
index 11e00e2..3cff478 100644
--- a/sys/modules/pf/Makefile
+++ b/sys/modules/pf/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/pf/net
.PATH: ${.CURDIR}/../../contrib/pf/netinet
@@ -14,7 +16,7 @@ CFLAGS+= -I${.CURDIR}/../../contrib/pf
opt_inet.h:
echo "#define INET 1" > opt_inet.h
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > opt_inet6.h
.endif
diff --git a/sys/modules/pflog/Makefile b/sys/modules/pflog/Makefile
index f4a83df..12ead12 100644
--- a/sys/modules/pflog/Makefile
+++ b/sys/modules/pflog/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/pf/net
KMOD= pflog
@@ -12,7 +14,7 @@ CFLAGS+= -I${.CURDIR}/../../contrib/pf
opt_inet.h:
echo "#define INET 1" > opt_inet.h
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
opt_inet6.h:
echo "#define INET6 1" > opt_inet6.h
.endif
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index a1961e5..404ba91 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -1,12 +1,16 @@
# From: @(#)Makefile 8.3 (Berkeley) 1/7/94
# $FreeBSD$
+.include <bsd.own.mk>
+
# XXX MISSING: deroff diction graph learn plot
# spell spline struct xsend
# XXX Use GNU versions: apropos bc dc diff grep ld man patch whatis
# Moved to secure: bdes
#
+.include <bsd.own.mk>
+
SUBDIR= alias \
apply \
asa \
@@ -232,59 +236,59 @@ SUBDIR= alias \
_truss= truss
.endif
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
_atm= atm
.endif
-.if !defined(NO_MAN)
+.if ${MK_MAN} != "no"
_catman= catman
.endif
-.if !defined(NO_BIND) && !defined(NO_BIND_UTILS)
+.if ${MK_BIND_UTILS} != "no"
_dig= dig
_host= host
_nslookup= nslookup
_nsupdate= nsupdate
.endif
-.if !defined(NO_BLUETOOTH)
+.if ${MK_BLUETOOTH} != "no"
_bluetooth= bluetooth
.endif
-.if !defined(NO_CALENDAR)
+.if ${MK_CALENDAR} != "no"
_calendar= calendar
.endif
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
_chkey= chkey
_newkey= newkey
_csup= csup
.endif
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD} != "no"
_hesinfo= hesinfo
.endif
-.if !defined(NO_NETCAT)
+.if ${MK_NETCAT} != "no"
_nc= nc
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
_ypcat= ypcat
_ypmatch= ypmatch
_ypwhich= ypwhich
.endif
-.if !defined(NO_RCMDS)
+.if ${MK_RCMDS} != "no"
_rlogin= rlogin
_rsh= rsh
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_vacation= vacation
.endif
-.if !defined(NO_TOOLCHAIN)
+.if ${MK_TOOLCHAIN} != "no"
_c89= c89
_c99= c99
_gprof= gprof
@@ -293,7 +297,7 @@ _xlint= xlint
_yacc= yacc
.endif
-.if !defined(NO_USB)
+.if ${MK_USB} != "no"
_usbhidaction= usbhidaction
_usbhidctl= usbhidctl
.endif
diff --git a/usr.bin/chkey/Makefile b/usr.bin/chkey/Makefile
index f3f5bd6..847e5c9 100644
--- a/usr.bin/chkey/Makefile
+++ b/usr.bin/chkey/Makefile
@@ -1,11 +1,13 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../newkey
PROG= chkey
SRCS= chkey.c generic.c update.c
CFLAGS+= -I${.CURDIR}/../newkey
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
DPADD= ${LIBRPCSVC} ${LIBMP} ${LIBCRYPTO}
diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile
index 3ffb0ef..2bbdc08 100644
--- a/usr.bin/chpass/Makefile
+++ b/usr.bin/chpass/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.2 (Berkeley) 4/2/94
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../lib/libc/gen
PROG= chpass
@@ -8,7 +10,7 @@ SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c
BINOWN= root
BINMODE=4555
WARNS?= 5
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
#Some people need this, uncomment to activate
@@ -17,21 +19,21 @@ CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I.
DPADD= ${LIBCRYPT} ${LIBUTIL}
LDADD= -lcrypt -lutil
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
DPADD+= ${LIBYPCLNT}
LDADD+= -lypclnt
.endif
LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
LINKS+= ${BINDIR}/chpass ${BINDIR}/chsh
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchpass
LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchfn
LINKS+= ${BINDIR}/chpass ${BINDIR}/ypchsh
.endif
MLINKS= chpass.1 chfn.1 chpass.1 chsh.1
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
.endif
diff --git a/usr.bin/fetch/Makefile b/usr.bin/fetch/Makefile
index 68115a7..c422af8 100644
--- a/usr.bin/fetch/Makefile
+++ b/usr.bin/fetch/Makefile
@@ -1,11 +1,13 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= fetch
CSTD?= c99
WARNS?= 6
DPADD= ${LIBFETCH}
LDADD= -lfetch
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
DPADD+= ${LIBSSL} ${LIBCRYPTO}
LDADD+= -lssl -lcrypto
.endif
diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile
index dcba8af..5b414bd 100644
--- a/usr.bin/login/Makefile
+++ b/usr.bin/login/Makefile
@@ -1,13 +1,15 @@
# @(#)Makefile 8.1 (Berkeley) 7/19/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= login
SRCS= login.c login_audit.c login_fbtab.c
CFLAGS+=-DLOGALL
DPADD= ${LIBUTIL} ${LIBPAM}
LDADD= -lutil ${MINUSLPAM} -lbsm
-.if !defined(NO_SETUID_LOGIN)
+.if ${MK_SETUID_LOGIN} != "no"
BINOWN= root
BINMODE=4555
PRECIOUSPROG=
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index b2c32dc..5bafeea 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.1 (Berkeley) 6/12/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= netstat
SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c route.c \
unix.c atalk.c netgraph.c mroute6.c ipsec.c bpf.c pfkey.c
@@ -10,7 +12,7 @@ NO_WERROR=
CFLAGS+=-DIPSEC
CFLAGS+=-DFAST_IPSEC
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
@@ -19,7 +21,7 @@ BINMODE=2555
DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBNETGRAPH} ${LIBUTIL}
LDADD= -lkvm -lmemstat -lnetgraph -lutil
-.if !defined(NO_IPX)
+.if ${MK_IPX_SUPPORT} != "no"
SRCS+= ipx.c
DPADD+= ${LIBIPX}
LDADD+= -lipx
diff --git a/usr.bin/newkey/Makefile b/usr.bin/newkey/Makefile
index 670aa3c..b3b5b51 100644
--- a/usr.bin/newkey/Makefile
+++ b/usr.bin/newkey/Makefile
@@ -1,8 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= newkey
SRCS= newkey.c generic.c update.c
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
MAN= newkey.8
diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile
index ef68ba6..a1ce76b 100644
--- a/usr.bin/passwd/Makefile
+++ b/usr.bin/passwd/Makefile
@@ -1,12 +1,14 @@
# From: @(#)Makefile 8.3 (Berkeley) 4/2/94
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG = passwd
BINOWN = root
BINMODE = 4555
DPADD = ${LIBPAM}
LDADD = ${MINUSLPAM}
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
LINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd
MLINKS = passwd.1 yppasswd.1
.endif
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index e364934..424f261 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
TELNETDIR= ${.CURDIR}/../../contrib/telnet
.PATH: ${TELNETDIR}/telnet
@@ -27,12 +29,12 @@ CFLAGS+= -DHAS_CGETENT
.endif
.if !defined(RELEASE_CRUNCH)
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
SRCS+= authenc.c
CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DIPSEC
DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBIPSEC} ${LIBPAM}
LDADD+= -lmp -lcrypto -lcrypt -lipsec ${MINUSLPAM}
-.if !defined(NO_KERBEROS)
+.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write
DPADD+= ${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
LDADD+= -lkrb5 -lasn1 -lcom_err -lroken
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index b4212d7..0618b6e 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -1,6 +1,8 @@
# From: @(#)Makefile 5.20 (Berkeley) 6/12/93
# $FreeBSD$
+.include <bsd.own.mk>
+
# XXX MISSING: mkproto
SUBDIR= ac \
accton \
@@ -195,23 +197,22 @@ SUBDIR= ac \
_sysinstall= sysinstall
.endif
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
_atm= atm
.endif
-.if !defined(NO_AUDIT)
+.if ${MK_AUDIT} != "no"
_audit= audit
_auditd= auditd
_auditreduce= auditreduce
_praudit= praudit
.endif
-.if !defined(NO_BIND)
-.if !defined(NO_BIND_DNSSEC) && !defined(NO_CRYPT)
+.if ${MK_BIND_DNSSEC} != "no" && ${MK_OPENSSL} != "no"
_dnssec-keygen= dnssec-keygen
_dnssec-signzone= dnssec-signzone
.endif
-.if !defined(NO_BIND_NAMED)
+.if ${MK_BIND_NAMED} != "no"
_named= named
_named-checkconf= named-checkconf
_named-checkzone= named-checkzone
@@ -219,24 +220,23 @@ _named.reload= named.reload
_rndc= rndc
_rndc-confgen= rndc-confgen
.endif
-.endif
-.if !defined(NO_BLUETOOTH)
+.if ${MK_BLUETOOTH} != "no"
_bluetooth= bluetooth
.endif
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
_keyserv= keyserv
.endif
-.if !defined(NO_INET6)
+.if ${MK_INET6} != "no"
_mld6query= mld6query
_rip6query= rip6query
_route6d= route6d
_traceroute6= traceroute6
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
_rpc.yppasswdd= rpc.yppasswdd
_rpc.ypupdated= rpc.ypupdated
_rpc.ypxfrd= rpc.ypxfrd
@@ -248,15 +248,15 @@ _ypserv= ypserv
_ypset= ypset
.endif
-.if !defined(NO_PF) && !defined(NO_AUTHPF)
+.if ${MK_AUTHPF} != "no"
_authpf= authpf
.endif
-.if !defined(NO_LPR)
+.if ${MK_LPR} != "no"
_lpr= lpr
.endif
-.if !defined(NO_SENDMAIL)
+.if ${MK_SENDMAIL} != "no"
_editmap= editmap
_mailstats= mailstats
_makemap= makemap
@@ -264,7 +264,7 @@ _praliases= praliases
_sendmail= sendmail
.endif
-.if !defined(NO_USB)
+.if ${MK_USB} != "no"
_usbdevs= usbdevs
.endif
@@ -277,7 +277,7 @@ _apm= apm
_apmd= apmd
_asf= asf
_btxld= btxld
-.if !defined(NO_I4B)
+.if ${MK_I4B} != "no"
_i4b= i4b
.endif
_kgmon= kgmon
@@ -289,19 +289,19 @@ _mptable= mptable
_ndiscvt= ndiscvt
_pccard= pccard
_pnpinfo= pnpinfo
-.if !defined(NO_LIBPTHREAD)
+.if ${MK_LIBPTHREAD} != "no"
_pppctl= pppctl
.endif
_sicontrol= sicontrol
_spkrtest= spkrtest
_zzz= zzz
.if ${MACHINE} == "i386"
-.if !defined(NO_ACPI)
+.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_arlcontrol= arlcontrol
_boot0cfg= boot0cfg
-.if !defined(NO_PCVT)
+.if ${MK_PCVT} != "no"
_pcvt= pcvt
.endif
_wlconfig= wlconfig
@@ -313,7 +313,7 @@ _boot98cfg= boot98cfg
.if ${MACHINE_ARCH} == "alpha"
_elf2exe= elf2exe
_pnpinfo= pnpinfo
-.if !defined(NO_LIBC_R)
+.if ${MK_LIBC_R} != "no"
_pppctl= pppctl
.endif
.endif
@@ -322,7 +322,7 @@ _pppctl= pppctl
# mptable: broken (not 64 bit clean)
# pnpinfo: crashes (not really useful anyway)
.if ${MACHINE_ARCH} == "amd64"
-.if !defined(NO_ACPI)
+.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_asf= asf
@@ -334,7 +334,7 @@ _mount_nwfs= mount_nwfs
_mount_smbfs= mount_smbfs
_mptable= mptable
_ndiscvt= ndiscvt
-.if !defined(NO_LIBPTHREAD)
+.if ${MK_LIBPTHREAD} != "no"
_pppctl= pppctl
.endif
_sicontrol= sicontrol
@@ -343,11 +343,11 @@ _zzz= zzz
.endif
.if ${MACHINE_ARCH} == "ia64"
-.if !defined(NO_ACPI)
+.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_kgmon= kgmon
-.if !defined(NO_LIBPTHREAD)
+.if ${MK_LIBPTHREAD} != "no"
_pppctl= pppctl
.endif
_zzz= zzz
@@ -360,7 +360,7 @@ _mount_smbfs= mount_smbfs
.if ${MACHINE_ARCH} == "sparc64"
_eeprom= eeprom
_ofwdump= ofwdump
-.if !defined(NO_LIBC_R)
+.if ${MK_LIBC_R} != "no"
_pppctl= pppctl
.endif
.endif
diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc
index d4d21f7..afb287f 100644
--- a/usr.sbin/amd/Makefile.inc
+++ b/usr.sbin/amd/Makefile.inc
@@ -9,6 +9,8 @@
# Portions derived from amd/libamu/Makefile
# $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $
+.include <bsd.own.mk>
+
CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/../include
.if exists(${.OBJDIR}/../include)
@@ -17,11 +19,11 @@ CFLAGS+= -I${.OBJDIR}/../include
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/include
CFLAGS+= -I${.CURDIR}/../../../contrib/amd
CFLAGS+= -DHAVE_CONFIG_H
-.if defined(NO_NIS)
+.if ${MK_NIS} == "no"
CFLAGS+= -DHAVE_LOCALCONFIG_H
.endif
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD_SUPPORT} != "no"
CFLAGS+= -DYES_HESIOD
.endif
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index 3509d66..3cc8657 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -6,6 +6,8 @@
# $FreeBSD$
#
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/amd/amd
PROG= amd
@@ -39,11 +41,11 @@ CLEANFILES+= mount_xdr.c
mount_xdr.c: ${MOUNT_X}
${RPCCOM} -c -DWANT_NFS3 ${MOUNT_X} -o ${.TARGET}
-.if defined(YES_HESIOD)
+.if ${MK_HESIOD_SUPPORT} != "no"
SRCS+= info_hesiod.c
.endif
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
SRCS+= info_nis.c
.endif
diff --git a/usr.sbin/amd/include/Makefile b/usr.sbin/amd/include/Makefile
index 7fa54ae..df770d1 100644
--- a/usr.sbin/amd/include/Makefile
+++ b/usr.sbin/amd/include/Makefile
@@ -7,8 +7,10 @@
# Portions derived from amd/libamu/Makefile
# $NetBSD: Makefile,v 1.8 1998/08/08 22:33:37 christos Exp $
+.include <bsd.own.mk>
+
SRCS= config_local.h
-.if defined(NO_NIS)
+.if ${MK_NIS} == "no"
SRCS+= localconfig.h
.endif
CLEANFILES= ${SRCS}
@@ -21,7 +23,7 @@ config_local.h: newvers.sh
localconfig.h:
@rm -f ${.TARGET}
- @echo "/* NIS disabled by NO_NIS make.conf option */" >> ${.TARGET}
+ @echo "/* NIS disabled by WITHOUT_NIS src.conf option */" >> ${.TARGET}
@echo "#undef HAVE_MAP_NIS" >> ${.TARGET}
.include <bsd.prog.mk>
diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile
index af8a0dc..5d2047b 100644
--- a/usr.sbin/bootparamd/bootparamd/Makefile
+++ b/usr.sbin/bootparamd/bootparamd/Makefile
@@ -1,13 +1,15 @@
# from: @(#)Makefile 5.8 (Berkeley) 7/28/90
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= bootparamd
MAN= bootparams.5 bootparamd.8
SRCS= bootparamd.c main.c ${GENSRCS}
GENSRCS=bootparam_prot.h bootparam_prot_svc.c bootparam_prot_xdr.c
CFLAGS+= -DTFTP_DIR=\"/tftpboot\" -I.
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
CFLAGS+= -DYP
.endif
diff --git a/usr.sbin/bsnmpd/modules/Makefile b/usr.sbin/bsnmpd/modules/Makefile
index faa5650..f5a2e41 100644
--- a/usr.sbin/bsnmpd/modules/Makefile
+++ b/usr.sbin/bsnmpd/modules/Makefile
@@ -1,8 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/bsnmp/snmpd
-.if !defined(NO_ATM)
+.if ${MK_ATM} != "no"
_snmp_atm= snmp_atm
.endif
diff --git a/usr.sbin/mailwrapper/Makefile b/usr.sbin/mailwrapper/Makefile
index 6d52dad..3f305f7 100644
--- a/usr.sbin/mailwrapper/Makefile
+++ b/usr.sbin/mailwrapper/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
-.if !defined(NO_MAILWRAPPER)
+.include <bsd.own.mk>
+
+.if ${MK_MAILWRAPPER} != "no"
PROG= mailwrapper
MAN= mailwrapper.8
@@ -8,19 +10,19 @@ DPADD= ${LIBUTIL}
LDADD= -lutil
.endif
-.if !defined(NO_MAILWRAPPER) || !defined(NO_SENDMAIL)
+.if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no"
SYMLINKS= ${BINDIR}/mailwrapper /usr/sbin/sendmail \
${BINDIR}/mailwrapper /usr/sbin/hoststat \
${BINDIR}/mailwrapper /usr/sbin/purgestat \
${BINDIR}/mailwrapper /usr/bin/newaliases \
${BINDIR}/mailwrapper /usr/bin/mailq
-.if defined(NO_MAILWRAPPER) && !defined(NO_SENDMAIL)
+.if ${MK_MAILWRAPPER} == "no" && ${MK_SENDMAIL} != "no"
SYMLINKS+= /usr/libexec/sendmail/sendmail ${BINDIR}/mailwrapper
.endif
.endif
-.if !defined(NO_MAILWRAPPER)
+.if ${MK_MAILWRAPPER} != "no"
.if !exists(${DESTDIR}/etc/mail/mailer.conf)
FILES= ${.CURDIR}/../../etc/mail/mailer.conf
FILESDIR= /etc/mail
diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc
index 3a85910..dee6598 100644
--- a/usr.sbin/ntp/Makefile.inc
+++ b/usr.sbin/ntp/Makefile.inc
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H
NTPDEFS= -DSYS_FREEBSD
# CLOCKDEFS=
@@ -8,7 +10,7 @@ NTPDEFS= -DSYS_FREEBSD
# -DMX4200 -DNMEA -DBOEDER
CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS}
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
CFLAGS+= -DOPENSSL
.endif
diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile
index d49a0db..7788094 100644
--- a/usr.sbin/ntp/doc/Makefile
+++ b/usr.sbin/ntp/doc/Makefile
@@ -1,8 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
FILESDIR= ${SHAREDIR}/doc/ntp
-.if !defined(NO_HTML)
+.if ${MK_HTML} != "no"
FILES= accopt.html assoc.html audio.html authopt.html build.html \
clockopt.html \
config.html confopt.html copyright.html debug.html driver1.html \
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 7ccdee2..5211b6f 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -1,17 +1,20 @@
# $FreeBSD$
+NO_MAN=
+
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/ntp/util \
${.CURDIR}/../../../contrib/ntp/ntpd
PROG= ntp-keygen
-NO_MAN=
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
DPADD= ${LIBNTP}
LDADD= ${LIBNTP}
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
DPADD+= ${LIBMD} ${LIBCRYPTO}
LDADD+= -lmd -lcrypto
.endif
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 5b3fdba..82c99c8 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -1,9 +1,12 @@
# $FreeBSD$
+NO_MAN=
+
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpd
PROG= ntpd
-NO_MAN=
SRCS= cmd_args.c map_vme.c ntp_config.c \
ntp_control.c ntp_crypto.c ntp_filegen.c \
ntp_intres.c ntp_io.c ntp_loopfilter.c \
@@ -31,7 +34,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD}
LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
.endif
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index 730308c..1e42b43 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -1,9 +1,12 @@
# $FreeBSD$
+NO_MAN=
+
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdc
PROG= ntpdc
-NO_MAN=
SRCS= ntpdc.c ntpdc_ops.c version.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
@@ -11,7 +14,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
DPADD= ${LIBNTP} ${LIBMD}
LDADD= ${LIBNTP} -lmd
-.if !defined(NO_GNU)
+.if ${MK_GNU_SUPPORT} != "no"
DPADD+= ${LIBREADLINE} ${LIBTERMCAP}
LDADD+= -lreadline -ltermcap
CFLAGS+= -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY_H \
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index 613e02e..6e749d6 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -1,11 +1,14 @@
# $FreeBSD$
+NO_MAN=
+
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../../contrib/ntp/ntpq
BINDIR= /usr/bin
PROG= ntpq
-NO_MAN=
SRCS= ntpq.c ntpq_ops.c version.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
@@ -13,7 +16,7 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
DPADD= ${LIBNTP} ${LIBMD}
LDADD= ${LIBNTP} -lmd
-.if !defined(NO_GNU)
+.if ${MK_GNU_SUPPORT} != "no"
DPADD+= ${LIBREADLINE} ${LIBTERMCAP}
LDADD+= -lreadline -ltermcap
CFLAGS+= -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY_H \
diff --git a/usr.sbin/pkg_install/Makefile b/usr.sbin/pkg_install/Makefile
index e74b5dc..d4a0baf 100644
--- a/usr.sbin/pkg_install/Makefile
+++ b/usr.sbin/pkg_install/Makefile
@@ -1,8 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= lib add create delete info ${_sign} version
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL)
+.if ${MK_OPENSSL} != "no"
_sign= sign
.endif
diff --git a/usr.sbin/pkg_install/Makefile.inc b/usr.sbin/pkg_install/Makefile.inc
index e27d31a..bff3474 100644
--- a/usr.sbin/pkg_install/Makefile.inc
+++ b/usr.sbin/pkg_install/Makefile.inc
@@ -1,8 +1,10 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
LIBINSTALL= ${.OBJDIR}/../lib/libinstall.a
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && \
+.if ${MK_OPENSSL} != "no" && \
defined(LDADD) && ${LDADD:M-lfetch} != ""
DPADD+= ${LIBSSL} ${LIBCRYPTO}
LDADD+= -lssl -lcrypto
diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh
index 75772f6..d70d7b3 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.sh
+++ b/usr.sbin/portsnap/portsnap/portsnap.sh
@@ -318,7 +318,7 @@ update_check_params() {
# We also ignore the Port field, since we are always going to use port 80.
fetch_pick_server() {
# Check that host(1) exists (i.e., that the system wasn't built with the
-# NO_BIND flag set) and don't try to find a mirror if it doesn't exist.
+# WITHOUT_BIND set) and don't try to find a mirror if it doesn't exist.
if ! which -s host; then
return
fi
diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile
index 007e5e1..ea8a462 100644
--- a/usr.sbin/ppp/Makefile
+++ b/usr.sbin/ppp/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= ppp
MAN= ppp.8
SRCS= acf.c arp.c async.c auth.c bundle.c cbcp.c ccp.c chap.c chat.c \
@@ -21,13 +23,13 @@ PPP_NO_RADIUS=
PPP_NO_SUID=
.endif
-.if defined(NO_ATM)
+.if ${MK_ATM} == "no"
PPP_NO_ATM=
.endif
-.if defined(NO_I4B)
+.if ${MK_I4B} == "no"
PPP_NO_I4B=
.endif
-.if defined(NO_PAM)
+.if ${MK_PAM_SUPPORT} == "no"
PPP_NO_PAM=
.endif
@@ -58,7 +60,7 @@ CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
CFLAGS+=-DNOKLDLOAD
.endif
-.if defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} == "no"
CFLAGS+=-DNOINET6
.endif
@@ -82,7 +84,7 @@ CFLAGS+=-DNOSUID
SRCS+= id.c
.endif
-.if defined(RELEASE_CRUNCH) || defined(NO_CRYPT) || defined(NO_OPENSSL) || \
+.if defined(RELEASE_CRUNCH) || ${MK_OPENSSL} == "no" || \
defined(PPP_NO_DES)
CFLAGS+=-DNODES
.else
diff --git a/usr.sbin/pppd/Makefile b/usr.sbin/pppd/Makefile
index c7b6174..3a09d27 100644
--- a/usr.sbin/pppd/Makefile
+++ b/usr.sbin/pppd/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
# I once used this extensively, but no longer have a modem. Feel free
# to ask me questions about it, but I disclaim ownership now. -Peter
@@ -30,7 +32,7 @@ DPADD+= ${LIBPCAP}
LDADD+= -lpcap
# MS-CHAP support. Requires the DES library.
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
CFLAGS+= -DCHAPMS
SRCS+= chap_ms.c
LDADD+= -lcrypto
diff --git a/usr.sbin/rpcbind/Makefile b/usr.sbin/rpcbind/Makefile
index 6d87b63..3251378 100644
--- a/usr.sbin/rpcbind/Makefile
+++ b/usr.sbin/rpcbind/Makefile
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.3 2000/06/20 13:56:43 fvdl Exp $
# $FreeBSD$
+.include <bsd.own.mk>
PROG= rpcbind
MAN= rpcbind.8
@@ -9,7 +10,7 @@ SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \
CFLAGS+= -DPORTMAP -DLIBWRAP
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile
index b5874d3..458000b 100644
--- a/usr.sbin/sendmail/Makefile
+++ b/usr.sbin/sendmail/Makefile
@@ -1,6 +1,8 @@
# @(#)Makefile 8.8 (Berkeley) 3/28/97
# $FreeBSD$
+.include <bsd.own.mk>
+
SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
SMDIR= ${SENDMAIL_DIR}/src
.PATH: ${SMDIR}
@@ -28,7 +30,7 @@ BINMODE=2555
# Define the database format to use for aliases et al.
DBMDEF= -DNEWDB
# If you don't want NIS alias/map support, comment out this line
-.if !defined(NO_NIS)
+.if ${MK_NIS} != "no"
NIS= -DNIS
.endif
# Map extensions
@@ -38,7 +40,7 @@ CSTD?= c89
CFLAGS+= -I${SMDIR} -I${SENDMAIL_DIR}/include -I.
CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS ${MAPS}
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DNETINET6
.endif
@@ -57,7 +59,7 @@ LDADD+= ${LIBSMUTIL} ${LIBSM}
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
# STARTTLS support
CFLAGS+= -DSTARTTLS -D_FFR_TLS_1 -D_FFR_DEAL_WITH_ERROR_SSL
DPADD+= ${LIBSSL} ${LIBCRYPTO}
diff --git a/usr.sbin/tcpdchk/Makefile b/usr.sbin/tcpdchk/Makefile
index a943651..2936984 100644
--- a/usr.sbin/tcpdchk/Makefile
+++ b/usr.sbin/tcpdchk/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
PROG= tcpdchk
@@ -9,7 +11,7 @@ SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c
CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \
-DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 -DPROCESS_OPTIONS \
-DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/usr.sbin/tcpdmatch/Makefile b/usr.sbin/tcpdmatch/Makefile
index 2370e9c..cbd61aa 100644
--- a/usr.sbin/tcpdmatch/Makefile
+++ b/usr.sbin/tcpdmatch/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
PROG= tcpdmatch
@@ -8,7 +10,7 @@ SRCS= tcpdmatch.c fakelog.c inetcf.c scaffold.c
CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \
-DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+=-DINET6
.endif
diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile
index 8cce9cc..71ab9ce 100644
--- a/usr.sbin/tcpdump/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/tcpdump/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
TCPDUMP_DISTDIR?= ${.CURDIR}/../../../contrib/tcpdump
.PATH: ${TCPDUMP_DISTDIR}
@@ -35,7 +37,7 @@ CFLAGS+= -I${.CURDIR} -I${TCPDUMP_DISTDIR}
CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -D_U_="__attribute__((unused))"
-.if !defined(NO_INET6)
+.if ${MK_INET6_SUPPORT} != "no"
SRCS+= print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c \
print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-mobility.c
CFLAGS+= -DINET6
@@ -46,7 +48,7 @@ CFLAGS+= -DLBL_ALIGN
DPADD= ${LIBL} ${LIBPCAP}
LDADD= -ll -lpcap
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
CFLAGS+= -I${DESTDIR}/usr/include/openssl -DHAVE_LIBCRYPTO -DHAVE_RC5_H -DHAVE_CAST_H -DHAVE_OPENSSL_EVP_H
diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile
index 62ecde8..0348fdb 100644
--- a/usr.sbin/wpa/wpa_supplicant/Makefile
+++ b/usr.sbin/wpa/wpa_supplicant/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
WPA_SUPPLICANT_DISTDIR?= ${.CURDIR}/../../../contrib/wpa_supplicant
.PATH: ${.CURDIR}/.. ${WPA_SUPPLICANT_DISTDIR}
@@ -23,11 +25,11 @@ LDADD+= -lpcap
SRCS+= config_file.c base64.c
CFLAGS+=-DCONFIG_BACKEND_FILE
-.if !defined(NO_WPA_SUPPLICANT_EAPOL)
+.if ${MK_WPA_SUPPLICANT_EAPOL} != "no"
SRCS+= eapol_sm.c eap.c
CFLAGS+= -DIEEE8021X_EAPOL
-.if !defined(NO_CRYPT) && !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_LEAP -DEAP_PSK \
-DEAP_TLV -DEAP_TLS_FUNCS
SRCS+= eap_tls.c eap_peap.c eap_mschapv2.c eap_leap.c \
OpenPOWER on IntegriCloud