Date: Wed, 5 Oct 2016 20:12:01 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306729 - head/tools/build/options Message-ID: <201610052012.u95KC1mg093045@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Oct 5 20:12:00 2016 New Revision: 306729 URL: https://svnweb.freebsd.org/changeset/base/306729 Log: 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. Sponsored by: The FreeBSD Foundation Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Wed Oct 5 20:08:07 2016 (r306728) +++ head/tools/build/options/makeman Wed Oct 5 20:12:00 2016 (r306729) @@ -33,12 +33,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}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610052012.u95KC1mg093045>