Page MenuHomeFreeBSD

D51827.id160059.diff
No OneTemporary

D51827.id160059.diff

diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk
--- a/share/mk/bsd.mkopt.mk
+++ b/share/mk/bsd.mkopt.mk
@@ -42,6 +42,13 @@
# always += this variable.
#
+__ALL_OPTIONS:= \
+ ${__DEFAULT_NO_OPTIONS} \
+ ${__DEFAULT_YES_OPTIONS} \
+ ${__REQUIRED_OPTIONS} \
+ ${__DEFAULT_DEPENDENT_OPTIONS:H} \
+ ${__SINGLE_OPTIONS}
+
#
# MK_* options which default to "yes".
#
@@ -144,3 +151,22 @@
MK_${vv:H}:= ${MK_${vv:H}}
.endfor
.undef __DEFAULT_DEPENDENT_OPTIONS
+
+#
+# Define SRC_OPT_DEFS and SRC_OPT_LIST
+#
+SRC_OPT_DEFS?=-D__${MACHINE_ARCH}__
+SRC_OPT_LIST?=TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH}
+.for option in ${__ALL_OPTIONS}
+.if defined(OPT_${option})
+SRC_OPT_DEFS+=-D${option}=${OPT_${option}:Q}
+SRC_OPT_LIST+=${option}=${OPT_${option}:Q}
+.elif ${MK_${option}} == yes
+SRC_OPT_DEFS+=-D${option}
+SRC_OPT_LIST+=WITH_${option}=1
+.elif ${MK_${option}} == no
+SRC_OPT_DEFS+=-U${option}
+SRC_OPT_LIST+=WITHOUT_${option}=1
+.endif
+.endfor
+.undef __ALL_OPTIONS
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -296,9 +296,9 @@
.include <bsd.compiler.mk>
.if ${__T} == "i386" || ${__T} == "amd64"
-__DEFAULT_NO_OPTIONS += FDT
+__DEFAULT_NO_OPTIONS+= FDT
.else
-__DEFAULT_YES_OPTIONS += FDT
+__DEFAULT_YES_OPTIONS+= FDT
.endif
.if ${__T:Marm*} == "" && ${__T:Mriscv64*} == ""
@@ -519,8 +519,4 @@
.endif
.endfor
-#
-# Set defaults for the MK_*_SUPPORT variables.
-#
-
.endif # !target(__<src.opts.mk>__)
diff --git a/tools/build/options/makeman b/tools/build/options/makeman
--- a/tools/build/options/makeman
+++ b/tools/build/options/makeman
@@ -127,8 +127,8 @@
exit 1
;;
esac
- requireds=`env -i ${make} -f ${srcdir}/share/mk/src.opts.mk \
- -V '${__REQUIRED_OPTIONS:ts,}'`
+ requireds=$(env -i ${make} -f ${srcdir}/share/mk/src.opts.mk -dv 2>&1 |
+ sed -n 's/^Global: __REQUIRED_OPTIONS = //p')
env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \
SRCCONF=/dev/null |
while read var _ val ; do

File Metadata

Mime Type
text/plain
Expires
Thu, May 21, 8:21 PM (22 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33404028
Default Alt Text
D51827.id160059.diff (1 KB)

Event Timeline