svn commit: r339281 - stable/11/tools/build/options
Ed Maste
emaste at FreeBSD.org
Wed Oct 10 13:06:32 UTC 2018
Author: emaste
Date: Wed Oct 10 13:06:31 2018
New Revision: 339281
URL: https://svnweb.freebsd.org/changeset/base/339281
Log:
MFC r306729: makeman: avoid bogus output with duplicated options
On some targets 'make showconfig' currently reports both 'no' and 'yes'
for some options. For example:
% make TARGET=mips showconfig | grep SSP
MK_SSP = no
MK_SSP = yes
Emit a warning on encountering a duplicated variable, and skip the
second entry.
PR: 226908, 229514
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/tools/build/options/makeman
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/tools/build/options/makeman
==============================================================================
--- stable/11/tools/build/options/makeman Wed Oct 10 10:34:17 2018 (r339280)
+++ stable/11/tools/build/options/makeman Wed Oct 10 13:06:31 2018 (r339281)
@@ -47,12 +47,18 @@ show_options()
ALL_TARGETS=$(echo $(${make} targets | tail -n +2))
rm -f $t/settings
for target in ${ALL_TARGETS} ; do
+ prev_opt=
env -i ${make} showconfig \
SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \
__MAKE_CONF=/dev/null \
TARGET_ARCH=${target#*/} TARGET=${target%/*} |
while read var _ val ; do
opt=${var#MK_}
+ if [ $opt = "$prev_opt" ]; then
+ echo "$target: ignoring duplicate option $opt" >&2
+ continue
+ fi
+ prev_opt=$opt
case ${val} in
yes)
echo ${opt} ${target}
More information about the svn-src-stable
mailing list