From e762b05c3d8306480d92c7de8c53002f9d54e6d9 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 13 Sep 2017 13:35:13 +0200 Subject: [PATCH 196/325] tools/build/options/makeman: Add silly hack to deal with options that have no description (XXX) If the option doesn't have a description file it's likely that the opposite option does have one. If it does, use its opossit and hope for the best. XXX: Does not confirm that the meaning of the description has actually been reverted by the sed calls. Obtained from: ElectroBSD --- tools/build/options/makeman | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index 328b9faed881..ea544d542dd4 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -249,13 +249,26 @@ EOF show_options | while read opt targets ; do - if [ ! -f ${opt} ] ; then - echo "no description found for ${opt}, skipping" >&2 - continue + echo ".It Va ${opt}" + + if [ -f ${opt} ] ; then + sed -e'/\$FreeBSD.*\$/d' ${opt} + else + warning="no description found for ${opt}" + opposit_opt=WITH${opt#WITHOUT} + if [ -f ${opposit_opt} ] ; then + warning="${warning}. Using the opossite of ${opposit_opt}'s description" >&2 + sed -e'/\$FreeBSD.*\$/d' -E -e 's@(Set to) (build)@\1 not \2@' ${opposit_opt} + else + opposit_opt=WITHOUT${opt#WITH} + if [ -f ${opposit_opt} ] ; then + warning="${warning}. Using opossite of ${opposit_opt}'s description" >&2 + sed -e'/\$FreeBSD.*\$/d' -E -e 's@(Set to) not (build)@\1 \2@' ${opposit_opt} + fi + fi + echo "${warning}" >&2 fi - echo ".It Va ${opt}" - sed -e'/\$FreeBSD.*\$/d' ${opt} if [ -n "${targets}" ] ; then echo '.Pp' echo 'This is a default setting on' -- 2.32.0