Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107372439
D41681.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D41681.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D41681: makeman: add minimal support for group options
Attached
Detach File
Event Timeline
Log In to Comment