diff options
author | emaste <emaste@FreeBSD.org> | 2013-06-10 13:55:03 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2013-06-10 13:55:03 +0000 |
commit | 793c8410e6ea82ff4971a557cc80e74a31e3b1c5 (patch) | |
tree | 136c78cbbde24a186b1a5bbdb4e2beb1611df0af /tools/build/options | |
parent | 015913b3831336ed004e485e122a772a0d8c5a67 (diff) | |
download | FreeBSD-src-793c8410e6ea82ff4971a557cc80e74a31e3b1c5.zip FreeBSD-src-793c8410e6ea82ff4971a557cc80e74a31e3b1c5.tar.gz |
Handle options that override other options
This is a workaround for WITH_LDNS_UTILS forcing BIND_UTILS off. It can
be reverted when we no longer have these conflicting options, or made more
general if we grow more cases like this.
Diffstat (limited to 'tools/build/options')
-rwxr-xr-x | tools/build/options/makeman | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/build/options/makeman b/tools/build/options/makeman index 61c0776..f619bc1 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -198,7 +198,12 @@ that can be used for source builds. .Bl -tag -width indent EOF show settings SRCCONF=/dev/null | sort > $t/config_default - show with SRCCONF=/dev/null | sort > $t/config_WITH_ALL + # Work around WITH_LDNS_UTILS forcing BIND_UTILS off by parsing the + # actual config that results from enabling every WITH_ option. This + # can be reverted if/when we no longer have options that disable + # others. + show with SRCCONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf + show settings SRCCONF=$t/src.conf | sort > $t/config_WITH_ALL show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL show_options | @@ -229,6 +234,18 @@ EOF exit 1 fi + show settings SRCCONF=/dev/null -D${opt} | sort > $t/config_${opt} + comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" | + comm -13 $t/deps - > $t/deps2 + + # Work around BIND_UTILS=no being the default when every WITH_ + # option is enabled. + if [ "$(cat $t/deps2)" == WITHOUT_BIND_UTILS ]; then + sort $t/deps $t/deps2 > $t/_deps + mv $t/_deps $t/deps + :> $t/deps2 + fi + if [ -s $t/deps ] ; then echo 'When set, it also enforces the following options:' echo '.Pp' @@ -240,10 +257,6 @@ EOF echo '.El' fi - show settings SRCCONF=/dev/null -D${opt} | sort > $t/config_${opt} - comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" | - comm -13 $t/deps - > $t/deps2 - if [ -s $t/deps2 ] ; then if [ -s $t/deps ] ; then echo '.Pp' |