Page MenuHomeFreeBSD

D41681.diff
No OneTemporary

D41681.diff

diff --git a/tools/build/options/makeman b/tools/build/options/makeman
--- a/tools/build/options/makeman
+++ b/tools/build/options/makeman
@@ -52,21 +52,32 @@
__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}
+ case $var in
+ MK_*)
+ 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}
+ ;;
+ no)
+ echo ${opt}
+ ;;
+ *)
+ echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
+ exit 1
+ ;;
+ esac
;;
- no)
- echo ${opt}
+ OPT_*)
+ # ignore
;;
*)
- echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
+ echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
exit 1
;;
esac
@@ -121,21 +132,53 @@
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
+ case ${var} in
+ MK_*)
+ opt=${var#MK_}
+ case ,${requireds}, in
+ *,${opt},*)
+ continue
+ ;;
+ esac
+ case ${val} in
+ yes)
+ echo ${yes_prefix}_${opt}
+ ;;
+ no)
+ echo ${no_prefix}_${opt}
+ ;;
+ *)
+ echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ OPT_*)
+ # ignore
+ ;;
+ *)
+ echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
+ exit 1
;;
esac
- case ${val} in
- yes)
- echo ${yes_prefix}_${opt}
+ done
+}
+
+show_group_options()
+{
+ env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \
+ SRCCONF=/dev/null |
+ while read var _ val ; do
+ case ${var} in
+ MK_*)
+ # ignore
;;
- no)
- echo ${no_prefix}_${opt}
+ OPT_*)
+ opt=${var#OPT_}
+ echo ${opt}
;;
*)
- echo "make showconfig broken: ${var} ${_} ${val} (not yes or no)" >&2
+ echo "make showconfig broken: ${var} ${_} ${val} not MK_ or OPT_" >&2
exit 1
;;
esac
@@ -332,6 +375,22 @@
printf "\n" >&2
cat <<EOF
.El
+.Pp
+The following options accept a single value from a list of valid values.
+.Bl -tag -width indent
+EOF
+ show_group_options |
+ while read opt ; do
+ if [ ! -f ${opt} ] ; then
+ echo "no description found for ${opt}, skipping" >&2
+ continue
+ fi
+
+ echo ".It Va ${opt}"
+ cat ${opt}
+ done
+ cat <<EOF
+.El
.Sh FILES
.Bl -tag -compact -width Pa
.It Pa /etc/src.conf

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 14, 5:21 AM (21 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15791371
Default Alt Text
D41681.diff (2 KB)

Event Timeline