From nobody Fri Sep 01 16:54:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RckfQ5PQhz4rlnr; Fri, 1 Sep 2023 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RckfQ4g0xz3V9v; Fri, 1 Sep 2023 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CB7AIAPp+qPkDNKMhC/ogSRxWdPZ6/3/XgJ7omyqXMI=; b=L1zciECr6RpWY4ef2tvCeGW1NOl9Fq0By5BKDKmaxIyeQugN54kk9VsfI64FBTFyDjEvc8 uMueN67Awemx3wEtn+iYLCsriVo5yvcKS+YZ1/kZZRtAI3Mch77IMOLaft/AAl1Dy5Ljvu ZO15YisRGDyo07b3VEko5VUNCzP5cdL9y7mDyCtNqYv7REJxH6zDIJxhgm82Ec+mrQPXFx hLHTXfSZm6q+cEZ4g6QMYQZr1DWTA4vXMA7CH0Pnzg8vEN+sqJ2oG5YClfPNfPWYt/DQY4 2/YqOLdXUWrx8sjWcWga6bmvcFIY4wTlRpExvPeCaMs6qq3GHKKnrWmxUuCLSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693587294; a=rsa-sha256; cv=none; b=vyUi7JdmtmJ96jMFtFJ70ffeA4ignXKB+WLYL6xiM3Xg21lOcpPkSOR5SPfmBF/mtwcTCu YwuN/vNW+kuAR5CQRJ0DWqor7LYcKJNfqHOOJo+6TlLQatNLv9/MdmsgHYwJeO8QfhHnmH De5D2+eMKQ8CzFTeu8yX1aKQ5h8LZZrrPzex5Z0fqTGWxn/wvfyl6mmK7iD2q/yrHfjIBQ oJ1YwkMwZkdSe8s/PuvnARHcA5L5w72yoXg0TW3VTQCIyGwrYwyy5NQL0ElpsNNbjOFFMk bm4V1tK4MyTPyUPn8mMoffbTNWaI+wubF5LbaaYTConbDzqtttVAnRBh3KJWVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693587294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CB7AIAPp+qPkDNKMhC/ogSRxWdPZ6/3/XgJ7omyqXMI=; b=BQdsNp93CSLyv4oE3Ke6/t7Da5ufQml03+JZLqoz5sT4xsQ7uenZoYWAVunWzHZLp++pNB fR49jD1cWQPW4JmIY7oluQNU8r+D98PFpjSTND3X5LjD9a8CJ08KjgOEMAdqFacUdZhUGY pX7AA0InbEJuz9jbs/7ReFmzWI8th/ePkl8CnsWk4N/vtsylePMYF0n/0CDVQ4F+5l0uyI 4l54JljywqBHrL5xYtMFZbJ53vcmlhPAPTbcglWBf02ojSZceqvRjBukqEBEuxEgGMiEVz 1wRvOQykDVm/DRQWnzAQVzsJahqzy7MCC95urE1NcrS4VtkevFpbzdnDB3YOsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RckfQ3lfcz181d; Fri, 1 Sep 2023 16:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381GssqZ070638; Fri, 1 Sep 2023 16:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381GssHB070635; Fri, 1 Sep 2023 16:54:54 GMT (envelope-from git) Date: Fri, 1 Sep 2023 16:54:54 GMT Message-Id: <202309011654.381GssHB070635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 897ae85f7d02 - main - makeman: add minimal support for group options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 897ae85f7d02e1244907587e7b7c3b628ca66365 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=897ae85f7d02e1244907587e7b7c3b628ca66365 commit 897ae85f7d02e1244907587e7b7c3b628ca66365 Author: Brooks Davis AuthorDate: 2023-09-01 16:41:59 +0000 Commit: Brooks Davis CommitDate: 2023-09-01 16:54:23 +0000 makeman: add minimal support for group options Ignore OPT_* values in showconfig out in exising code paths and add a new path to include descriptions for each. For now, hardcode the description contents rather than attempting to generate it. This runs the risk of docs getting out of date, limits the amount of new shell code added today while a lua rewrite is nearly ready to land. This change requires a followup commit to enable OPT_* values in "make showconfig" in order to actually find group options. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41681 --- tools/build/options/makeman | 103 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 81 insertions(+), 22 deletions(-) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index c4a51ec7c56e..f4089d453801 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -52,21 +52,32 @@ show_options() __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 @@ show() 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 @@ EOF printf "\n" >&2 cat <&2 + continue + fi + + echo ".It Va ${opt}" + cat ${opt} + done + cat <