aboutsummaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2012-11-04 02:52:03 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2012-11-04 02:52:03 +0000
commit23090366f729c56cab62de74c7a51792357e98a9 (patch)
treec511c885796e28ec571b5267e8f11f3b103d35e9 /tools/build
parent7750ad47a9a7dbc83f87158464170c8640723293 (diff)
parent22ff74b2f44234d31540b1f7fd6c91489c37cad3 (diff)
Notes
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/Makefile16
-rw-r--r--tools/build/make_check/Makefile36
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc282
-rw-r--r--tools/build/options/WITHOUT_ATF2
-rw-r--r--tools/build/options/WITHOUT_KDUMP5
-rw-r--r--tools/build/options/WITHOUT_PKGBOOTSTRAP4
-rw-r--r--tools/build/options/WITH_BMAKE8
-rw-r--r--tools/build/options/WITH_BSDCONFIG2
-rw-r--r--tools/build/options/WITH_BSD_SORT2
-rw-r--r--tools/build/options/WITH_INSTALL_AS_USER9
10 files changed, 306 insertions, 60 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 8e26c29d77357..76493f708ab4e 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -3,12 +3,24 @@
.PATH: ${.CURDIR}/../../include
LIB= egacy
-SRCS=
+SRC=
INCSGROUPS= INCS
-INCS=
+INCS=
BOOTSTRAPPING?= 0
+_WITH_GETLINE!= grep -c _WITH_GETLINE /usr/include/stdio.h || true
+.if ${_WITH_GETLINE} == 0
+.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic
+SRCS= getline.c config.h
+CFLAGS+= -DHAVE_CONFIG_H -I.
+CLEANFILES+= config.h
+
+${SRCS:N*.h:R:S/$/.o/}: config.h
+config.h: ${.CURDIR}/../../lib/libmagic/config.h
+ grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET}
+.endif
+
.if empty(SRCS)
SRCS= dummy.c
.endif
diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile
index 9c37c3f2ad0af..3a0f6ad2a956b 100644
--- a/tools/build/make_check/Makefile
+++ b/tools/build/make_check/Makefile
@@ -22,17 +22,8 @@ NIL=
SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR}
-.if !make(shell*)
-# check that make -V '${VARIABLE}' works
-V_expn != V_OK=ok ${SMAKE} -r -f /dev/null -V '$${V_OK}'
-.endif
-
all:
- @echo '0..16'
- @test "${V_expn}" != "" || \
- { echo ${MAKE} -V '$${VARIABLE}': no output; \
- ${MAKE} -C ${.CURDIR} failure; }
- @echo "ok 0 - make -V # handles substitution"
+ @echo '1..16'
@${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; }
@echo "ok 1 - C_check # Test of -C flag existence detected no regression."
@echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
@@ -65,9 +56,7 @@ all:
@echo "ok 14 shell # Test shell detected no regression."
@${SMAKE} shell_1 || ${SMAKE} failure
@echo "ok 15 shell_1 # Test shell_1 detected no regression."
-.if defined(.PARSEDIR)
- @echo "skipped 16 shell_2 # bmake handles shell errors differently"
-.else
+.if !defined(.PARSEDIR)
@${SMAKE} shell_2 || ${SMAKE} failure
@echo "ok 16 shell_2 # Test shell_2 detected no regression."
.endif
@@ -105,17 +94,34 @@ lhs_expn:
# to determine its value; that was not always the case.
.undef notdef
notdef:
-.if defined(notdef) && ${notdef:U}
+.if defined(notdef) && ${notdef:M/}
.endif
.endif
.if make(modifiers)
-# See if make(1) supports the C modifier.
+.if defined(.PARSEDIR)
+# check if bmake can expand plain variables
+.MAKE.EXPAND_VARIABLES= yes
+x!= ${SMAKE} -V .CURDIR:H
modifiers:
+.if ${.CURDIR:H} != "$x"
+ @false
+.endif
+.else
+# See if make(1) supports the C modifier.
+modifiers: dollarV
@if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \
grep -q "Unknown modifier 'C'"; then \
false; \
fi
+
+# check that make -V '${VAR}' works
+V_expn != V_OK=ok ${SMAKE} -r -f /dev/null -V '$${V_OK}'
+dollarV:
+.if ${V_expn} == ""
+ @false
+.endif
+.endif
.endif
.if make(arith_expr)
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 4351a2b1558e3..712501837d9e2 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -68,6 +68,77 @@ OLD_FILES+=usr/share/man/man1/batch.1.gz
OLD_FILES+=usr/share/man/man8/atrun.8.gz
.endif
+.if ${MK_ATF} == no
+OLD_DIRS+=etc/atf
+OLD_FILES+=etc/atf/FreeBSD.conf
+OLD_FILES+=etc/atf/atf-run.hooks
+OLD_FILES+=etc/atf/common.conf
+OLD_FILES+=usr/bin/atf-config
+OLD_FILES+=usr/bin/atf-report
+OLD_FILES+=usr/bin/atf-run
+OLD_FILES+=usr/bin/atf-sh
+OLD_FILES+=usr/bin/atf-version
+OLD_DIRS+=usr/include/atf-c
+OLD_FILES+=usr/include/atf-c/build.h
+OLD_FILES+=usr/include/atf-c/check.h
+OLD_FILES+=usr/include/atf-c/config.h
+OLD_FILES+=usr/include/atf-c/defs.h
+OLD_FILES+=usr/include/atf-c/error.h
+OLD_FILES+=usr/include/atf-c/error_fwd.h
+OLD_FILES+=usr/include/atf-c/macros.h
+OLD_FILES+=usr/include/atf-c/tc.h
+OLD_FILES+=usr/include/atf-c/tp.h
+OLD_FILES+=usr/include/atf-c/utils.h
+OLD_FILES+=usr/include/atf-c/atf-c.h
+OLD_FILES+=usr/include/atf-c.h
+OLD_DIRS+=usr/include/atf-c++
+OLD_FILES+=usr/include/atf-c++/build.hpp
+OLD_FILES+=usr/include/atf-c++/check.hpp
+OLD_FILES+=usr/include/atf-c++/config.hpp
+OLD_FILES+=usr/include/atf-c++/macros.hpp
+OLD_FILES+=usr/include/atf-c++/tests.hpp
+OLD_FILES+=usr/include/atf-c++/utils.hpp
+OLD_FILES+=usr/include/atf-c++/atf-c++.hpp
+OLD_FILES+=usr/include/atf-c++.hpp
+OLD_FILES+=usr/lib/libatf-c_p.a
+OLD_FILES+=usr/lib/libatf-c.so.1
+OLD_FILES+=usr/lib/libatf-c.so
+OLD_FILES+=usr/lib/libatf-c++.a
+OLD_FILES+=usr/lib/libatf-c++_p.a
+OLD_FILES+=usr/lib/libatf-c++.so.1
+OLD_FILES+=usr/lib/libatf-c++.so
+OLD_FILES+=usr/lib/libatf-c.a
+OLD_FILES+=usr/libexec/atf-check
+OLD_DIRS+=usr/share/atf
+OLD_FILES+=usr/share/atf/atf-run.hooks
+OLD_FILES+=usr/share/atf/libatf-sh.subr
+OLD_DIRS+=usr/share/doc/atf
+OLD_FILES+=usr/share/doc/atf/AUTHORS
+OLD_FILES+=usr/share/doc/atf/COPYING
+OLD_FILES+=usr/share/doc/atf/NEWS
+OLD_FILES+=usr/share/doc/atf/README
+OLD_DIRS+=usr/share/examples/atf
+OLD_FILES+=usr/share/examples/atf/atf-run.hooks
+OLD_FILES+=usr/share/examples/atf/tests-results.css
+OLD_FILES+=usr/share/man/man1/atf-check.1.gz
+OLD_FILES+=usr/share/man/man1/atf-config.1.gz
+OLD_FILES+=usr/share/man/man1/atf-report.1.gz
+OLD_FILES+=usr/share/man/man1/atf-run.1.gz
+OLD_FILES+=usr/share/man/man1/atf-sh.1.gz
+OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz
+OLD_FILES+=usr/share/man/man1/atf-version.1.gz
+OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz
+OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz
+OLD_FILES+=usr/share/man/man5/atf-formats.5.gz
+OLD_FILES+=usr/share/man/man7/atf.7.gz
+OLD_DIRS+=usr/share/xml/atf
+OLD_FILES+=usr/share/xml/atf/tests-results.dtd
+OLD_DIRS+=usr/share/xsl/atf
+OLD_FILES+=usr/share/xsl/atf/tests-results.xsl
+.endif
+
.if ${MK_ATM} == no
OLD_FILES+=rescue/atmconfig
OLD_FILES+=sbin/atmconfig
@@ -659,6 +730,57 @@ OLD_FILES+=usr/include/clang/3.0/wmmintrin.h
OLD_FILES+=usr/include/clang/3.0/x86intrin.h
OLD_FILES+=usr/include/clang/3.0/xmmintrin.h
OLD_DIRS+=usr/include/clang/3.0
+OLD_FILES+=usr/include/clang/3.1/altivec.h
+OLD_FILES+=usr/include/clang/3.1/avx2intrin.h
+OLD_FILES+=usr/include/clang/3.1/avxintrin.h
+OLD_FILES+=usr/include/clang/3.1/bmi2intrin.h
+OLD_FILES+=usr/include/clang/3.1/bmiintrin.h
+OLD_FILES+=usr/include/clang/3.1/cpuid.h
+OLD_FILES+=usr/include/clang/3.1/emmintrin.h
+OLD_FILES+=usr/include/clang/3.1/fma4intrin.h
+OLD_FILES+=usr/include/clang/3.1/immintrin.h
+OLD_FILES+=usr/include/clang/3.1/lzcntintrin.h
+OLD_FILES+=usr/include/clang/3.1/mm3dnow.h
+OLD_FILES+=usr/include/clang/3.1/mm_malloc.h
+OLD_FILES+=usr/include/clang/3.1/mmintrin.h
+OLD_FILES+=usr/include/clang/3.1/module.map
+OLD_FILES+=usr/include/clang/3.1/nmmintrin.h
+OLD_FILES+=usr/include/clang/3.1/pmmintrin.h
+OLD_FILES+=usr/include/clang/3.1/popcntintrin.h
+OLD_FILES+=usr/include/clang/3.1/smmintrin.h
+OLD_FILES+=usr/include/clang/3.1/tmmintrin.h
+OLD_FILES+=usr/include/clang/3.1/unwind.h
+OLD_FILES+=usr/include/clang/3.1/wmmintrin.h
+OLD_FILES+=usr/include/clang/3.1/x86intrin.h
+OLD_FILES+=usr/include/clang/3.1/xmmintrin.h
+OLD_DIRS+=usr/include/clang/3.1
+OLD_FILES+=usr/include/clang/3.2/altivec.h
+OLD_FILES+=usr/include/clang/3.2/ammintrin.h
+OLD_FILES+=usr/include/clang/3.2/avx2intrin.h
+OLD_FILES+=usr/include/clang/3.2/avxintrin.h
+OLD_FILES+=usr/include/clang/3.2/bmi2intrin.h
+OLD_FILES+=usr/include/clang/3.2/bmiintrin.h
+OLD_FILES+=usr/include/clang/3.2/cpuid.h
+OLD_FILES+=usr/include/clang/3.2/emmintrin.h
+OLD_FILES+=usr/include/clang/3.2/fma4intrin.h
+OLD_FILES+=usr/include/clang/3.2/fmaintrin.h
+OLD_FILES+=usr/include/clang/3.2/immintrin.h
+OLD_FILES+=usr/include/clang/3.2/lzcntintrin.h
+OLD_FILES+=usr/include/clang/3.2/mm3dnow.h
+OLD_FILES+=usr/include/clang/3.2/mm_malloc.h
+OLD_FILES+=usr/include/clang/3.2/mmintrin.h
+OLD_FILES+=usr/include/clang/3.2/module.map
+OLD_FILES+=usr/include/clang/3.2/nmmintrin.h
+OLD_FILES+=usr/include/clang/3.2/pmmintrin.h
+OLD_FILES+=usr/include/clang/3.2/popcntintrin.h
+OLD_FILES+=usr/include/clang/3.2/smmintrin.h
+OLD_FILES+=usr/include/clang/3.2/tmmintrin.h
+OLD_FILES+=usr/include/clang/3.2/unwind.h
+OLD_FILES+=usr/include/clang/3.2/wmmintrin.h
+OLD_FILES+=usr/include/clang/3.2/x86intrin.h
+OLD_FILES+=usr/include/clang/3.2/xmmintrin.h
+OLD_FILES+=usr/include/clang/3.2/xopintrin.h
+OLD_DIRS+=usr/include/clang/3.2
OLD_DIRS+=usr/include/clang
OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT
OLD_DIRS+=usr/share/doc/llvm/clang
@@ -3205,6 +3327,121 @@ OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz
# to be filled in
#.endif
+.if ${MK_LIBCPLUSPLUS} == no
+OLD_LIBS+=lib/libcxxrt.so.1
+OLD_FILES+=usr/lib/libc++.a
+OLD_FILES+=usr/lib/libc++_p.a
+OLD_FILES+=usr/lib/libc++.so
+OLD_LIBS+=usr/lib/libc++.so.1
+OLD_FILES+=usr/lib/libcxxrt.a
+OLD_FILES+=usr/lib/libcxxrt.so
+OLD_FILES+=usr/lib/libcxxrt_p.a
+OLD_FILES+=usr/include/c++/v1/__bit_reference
+OLD_FILES+=usr/include/c++/v1/__config
+OLD_FILES+=usr/include/c++/v1/__debug
+OLD_FILES+=usr/include/c++/v1/__functional_03
+OLD_FILES+=usr/include/c++/v1/__functional_base
+OLD_FILES+=usr/include/c++/v1/__functional_base_03
+OLD_FILES+=usr/include/c++/v1/__hash_table
+OLD_FILES+=usr/include/c++/v1/__locale
+OLD_FILES+=usr/include/c++/v1/__mutex_base
+OLD_FILES+=usr/include/c++/v1/__split_buffer
+OLD_FILES+=usr/include/c++/v1/__sso_allocator
+OLD_FILES+=usr/include/c++/v1/__std_stream
+OLD_FILES+=usr/include/c++/v1/__tree
+OLD_FILES+=usr/include/c++/v1/__tuple
+OLD_FILES+=usr/include/c++/v1/__tuple_03
+OLD_FILES+=usr/include/c++/v1/__undef_min_max
+OLD_FILES+=usr/include/c++/v1/algorithm
+OLD_FILES+=usr/include/c++/v1/array
+OLD_FILES+=usr/include/c++/v1/atomic
+OLD_FILES+=usr/include/c++/v1/bitset
+OLD_FILES+=usr/include/c++/v1/cassert
+OLD_FILES+=usr/include/c++/v1/ccomplex
+OLD_FILES+=usr/include/c++/v1/cctype
+OLD_FILES+=usr/include/c++/v1/cerrno
+OLD_FILES+=usr/include/c++/v1/cfenv
+OLD_FILES+=usr/include/c++/v1/cfloat
+OLD_FILES+=usr/include/c++/v1/chrono
+OLD_FILES+=usr/include/c++/v1/cinttypes
+OLD_FILES+=usr/include/c++/v1/ciso646
+OLD_FILES+=usr/include/c++/v1/climits
+OLD_FILES+=usr/include/c++/v1/clocale
+OLD_FILES+=usr/include/c++/v1/cmath
+OLD_FILES+=usr/include/c++/v1/codecvt
+OLD_FILES+=usr/include/c++/v1/complex
+OLD_FILES+=usr/include/c++/v1/complex.h
+OLD_FILES+=usr/include/c++/v1/condition_variable
+OLD_FILES+=usr/include/c++/v1/csetjmp
+OLD_FILES+=usr/include/c++/v1/csignal
+OLD_FILES+=usr/include/c++/v1/cstdarg
+OLD_FILES+=usr/include/c++/v1/cstdbool
+OLD_FILES+=usr/include/c++/v1/cstddef
+OLD_FILES+=usr/include/c++/v1/cstdint
+OLD_FILES+=usr/include/c++/v1/cstdio
+OLD_FILES+=usr/include/c++/v1/cstdlib
+OLD_FILES+=usr/include/c++/v1/cstring
+OLD_FILES+=usr/include/c++/v1/ctgmath
+OLD_FILES+=usr/include/c++/v1/ctime
+OLD_FILES+=usr/include/c++/v1/cwchar
+OLD_FILES+=usr/include/c++/v1/cwctype
+OLD_FILES+=usr/include/c++/v1/cxxabi.h
+OLD_FILES+=usr/include/c++/v1/deque
+OLD_FILES+=usr/include/c++/v1/exception
+OLD_FILES+=usr/include/c++/v1/ext/__hash
+OLD_FILES+=usr/include/c++/v1/ext/hash_map
+OLD_FILES+=usr/include/c++/v1/ext/hash_set
+OLD_FILES+=usr/include/c++/v1/forward_list
+OLD_FILES+=usr/include/c++/v1/fstream
+OLD_FILES+=usr/include/c++/v1/functional
+OLD_FILES+=usr/include/c++/v1/future
+OLD_FILES+=usr/include/c++/v1/initializer_list
+OLD_FILES+=usr/include/c++/v1/iomanip
+OLD_FILES+=usr/include/c++/v1/ios
+OLD_FILES+=usr/include/c++/v1/iosfwd
+OLD_FILES+=usr/include/c++/v1/iostream
+OLD_FILES+=usr/include/c++/v1/istream
+OLD_FILES+=usr/include/c++/v1/iterator
+OLD_FILES+=usr/include/c++/v1/limits
+OLD_FILES+=usr/include/c++/v1/list
+OLD_FILES+=usr/include/c++/v1/locale
+OLD_FILES+=usr/include/c++/v1/map
+OLD_FILES+=usr/include/c++/v1/memory
+OLD_FILES+=usr/include/c++/v1/mutex
+OLD_FILES+=usr/include/c++/v1/new
+OLD_FILES+=usr/include/c++/v1/numeric
+OLD_FILES+=usr/include/c++/v1/ostream
+OLD_FILES+=usr/include/c++/v1/queue
+OLD_FILES+=usr/include/c++/v1/random
+OLD_FILES+=usr/include/c++/v1/ratio
+OLD_FILES+=usr/include/c++/v1/regex
+OLD_FILES+=usr/include/c++/v1/scoped_allocator
+OLD_FILES+=usr/include/c++/v1/set
+OLD_FILES+=usr/include/c++/v1/sstream
+OLD_FILES+=usr/include/c++/v1/stack
+OLD_FILES+=usr/include/c++/v1/stdexcept
+OLD_FILES+=usr/include/c++/v1/streambuf
+OLD_FILES+=usr/include/c++/v1/string
+OLD_FILES+=usr/include/c++/v1/strstream
+OLD_FILES+=usr/include/c++/v1/system_error
+OLD_FILES+=usr/include/c++/v1/tgmath.h
+OLD_FILES+=usr/include/c++/v1/thread
+OLD_FILES+=usr/include/c++/v1/tuple
+OLD_FILES+=usr/include/c++/v1/type_traits
+OLD_FILES+=usr/include/c++/v1/typeindex
+OLD_FILES+=usr/include/c++/v1/typeinfo
+OLD_FILES+=usr/include/c++/v1/unordered_map
+OLD_FILES+=usr/include/c++/v1/unordered_set
+OLD_FILES+=usr/include/c++/v1/unwind-arm.h
+OLD_FILES+=usr/include/c++/v1/unwind-itanium.h
+OLD_FILES+=usr/include/c++/v1/unwind.h
+OLD_FILES+=usr/include/c++/v1/utility
+OLD_FILES+=usr/include/c++/v1/valarray
+OLD_FILES+=usr/include/c++/v1/vector
+OLD_DIRS+=usr/include/c++/v1/ext
+OLD_DIRS+=usr/include/c++/v1
+.endif
+
#.if ${MK_LIBTHR} == no
# to be filled in
#.endif
@@ -3292,47 +3529,6 @@ OLD_FILES+=usr/share/man/man8/mailwrapper.8.gz
# Listing all of them here is overkill.
#.endif
-.if ${MK_NCP} == no
-OLD_FILES+=usr/bin/ncplist
-OLD_FILES+=usr/bin/ncplogin
-OLD_FILES+=usr/bin/ncplogout
-OLD_FILES+=usr/include/fs/nwfs/nwfs.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_mount.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_node.h
-OLD_FILES+=usr/include/fs/nwfs/nwfs_subr.h
-#OLD_DIRS+=usr/include/fs/nwfs
-OLD_FILES+=usr/include/netncp/ncp.h
-OLD_FILES+=usr/include/netncp/ncp_cfg.h
-OLD_FILES+=usr/include/netncp/ncp_conn.h
-OLD_FILES+=usr/include/netncp/ncp_file.h
-OLD_FILES+=usr/include/netncp/ncp_lib.h
-OLD_FILES+=usr/include/netncp/ncp_ncp.h
-OLD_FILES+=usr/include/netncp/ncp_nls.h
-OLD_FILES+=usr/include/netncp/ncp_rcfile.h
-OLD_FILES+=usr/include/netncp/ncp_rq.h
-OLD_FILES+=usr/include/netncp/ncp_sock.h
-OLD_FILES+=usr/include/netncp/ncp_subr.h
-OLD_FILES+=usr/include/netncp/ncp_user.h
-OLD_FILES+=usr/include/netncp/ncpio.h
-OLD_FILES+=usr/include/netncp/nwerror.h
-#OLD_DIRS+=usr/include/netncp
-OLD_FILES+=usr/lib/libncp.a
-OLD_FILES+=usr/lib/libncp.so
-OLD_LIBS+=usr/lib/libncp.so.4
-OLD_FILES+=usr/lib/libncp_p.a
-.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
-OLD_FILES+=usr/lib32/libncp.a
-OLD_FILES+=usr/lib32/libncp.so
-OLD_LIBS+=usr/lib32/libncp.so.4
-OLD_FILES+=usr/lib32/libncp_p.a
-.endif
-OLD_FILES+=usr/sbin/mount_nwfs
-OLD_FILES+=usr/share/man/man1/ncplist.1.gz
-OLD_FILES+=usr/share/man/man1/ncplogin.1.gz
-OLD_FILES+=usr/share/man/man1/ncplogout.1.gz
-OLD_FILES+=usr/share/man/man8/mount_nwfs.8.gz
-.endif
-
.if ${MK_NDIS} == no
OLD_FILES+=usr/sbin/ndiscvt
OLD_FILES+=usr/sbin/ndisgen
@@ -3482,6 +3678,10 @@ OLD_FILES+=usr/share/man/man8/pflogd.8.gz
OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz
.endif
+.if ${MK_PKGBOOTSTRAP} == no
+OLD_FILES+=usr/sbin/pkg
+.endif
+
.if ${MK_PKGTOOLS} == no
OLD_FILES+=etc/periodic/daily/490.status-pkg-changes
OLD_FILES+=etc/periodic/security/460.chkportsum
diff --git a/tools/build/options/WITHOUT_ATF b/tools/build/options/WITHOUT_ATF
new file mode 100644
index 0000000000000..3ac5212e4d11a
--- /dev/null
+++ b/tools/build/options/WITHOUT_ATF
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build programs and libraries related to the ATF testing framework.
diff --git a/tools/build/options/WITHOUT_KDUMP b/tools/build/options/WITHOUT_KDUMP
new file mode 100644
index 0000000000000..8e78036d9e24b
--- /dev/null
+++ b/tools/build/options/WITHOUT_KDUMP
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build
+.Xr kdump 1
+and
+.Xr truss 1 .
diff --git a/tools/build/options/WITHOUT_PKGBOOTSTRAP b/tools/build/options/WITHOUT_PKGBOOTSTRAP
new file mode 100644
index 0000000000000..1f98dd58e388e
--- /dev/null
+++ b/tools/build/options/WITHOUT_PKGBOOTSTRAP
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build
+.Xr pkg 1
+bootstrap tool
diff --git a/tools/build/options/WITH_BMAKE b/tools/build/options/WITH_BMAKE
new file mode 100644
index 0000000000000..2b47121302c75
--- /dev/null
+++ b/tools/build/options/WITH_BMAKE
@@ -0,0 +1,8 @@
+.\" $FreeBSD$
+Build and install the portable BSD make (bmake) as
+.Xr make 1
+instead of the traditional FreeBSD make.
+This build option is temporary.
+It allows developers to switch to bmake in order to work out any remaining
+kinks or issues.
+This option will be removed in due time.
diff --git a/tools/build/options/WITH_BSDCONFIG b/tools/build/options/WITH_BSDCONFIG
new file mode 100644
index 0000000000000..f3e6e25b6602c
--- /dev/null
+++ b/tools/build/options/WITH_BSDCONFIG
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to install bsdconfig(8), a BSD-licensed configuration/management utility.
diff --git a/tools/build/options/WITH_BSD_SORT b/tools/build/options/WITH_BSD_SORT
deleted file mode 100644
index a9e654d2209f0..0000000000000
--- a/tools/build/options/WITH_BSD_SORT
+++ /dev/null
@@ -1,2 +0,0 @@
-.\" $FreeBSD$
-Install BSD-licensed sort as 'sort' instead of GNU sort.
diff --git a/tools/build/options/WITH_INSTALL_AS_USER b/tools/build/options/WITH_INSTALL_AS_USER
new file mode 100644
index 0000000000000..da49014316a68
--- /dev/null
+++ b/tools/build/options/WITH_INSTALL_AS_USER
@@ -0,0 +1,9 @@
+.\" $FreeBSD$
+Set to make install targets succeed for non-root users by installing
+files with owner and group attributes set to that of the user running
+the
+.Xr make 1
+command.
+The user still has to set the
+.Va DESTDIR
+variable to point to a directory where the user has write permissions.