Date: Wed, 10 Oct 2018 13:06:32 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339281 - stable/11/tools/build/options Message-ID: <201810101306.w9AD6Wcp027930@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810101306.w9AD6Wcp027930>