options/makeman: Handle __REQUIRED_OPTIONS

Teach the code which generates src.conf.5 about __REQUIRED_OPTIONS;
without this change it gets confused and thinks that every option
turns the required options on.

Reviewed by:	sjg, imp
Differential Revision:	https://reviews.freebsd.org/D40591
This commit is contained in:
Colin Percival 2023-06-17 17:01:52 -07:00
parent b908f6c45e
commit bce9967915

View file

@ -117,10 +117,17 @@ show()
exit 1
;;
esac
requireds=`env -i make -f ${srcdir}/share/mk/src.opts.mk \
-V '${__REQUIRED_OPTIONS:ts,}'`
env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \
SRCCONF=/dev/null |
while read var _ val ; do
opt=${var#MK_}
case ,${requireds}, in
*,${opt},*)
continue
;;
esac
case ${val} in
yes)
echo ${yes_prefix}_${opt}