[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] configure: Get help text from meson_options.txt
From: |
Eric Blake |
Subject: |
Re: [PATCH v2 4/5] configure: Get help text from meson_options.txt |
Date: |
Fri, 3 Sep 2021 12:20:06 -0500 |
User-agent: |
NeoMutt/20210205-739-420e15 |
On Fri, Sep 03, 2021 at 10:13:57AM +0200, Thomas Huth wrote:
> It's cumbersome to maintain the option help texts twice, once in the
> "configure" script and once in meson_options.txt. So let's add some logic to
> the configure script to read most of the help texts from meson_options.txt.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> configure | 95 ++++++++++++++++++-------------------------------------
> 1 file changed, 31 insertions(+), 64 deletions(-)
>
> +
> +# Read remaining options and help text from meson_options.txt:
> +current_feature=""
> +while read first rest ; do
> + case "$first" in
> + option*)
> + case "$rest" in
> + *type*:*"'feature'"*)
> + current_feature=${first%\'*}
> + current_feature=${current_feature#*\'}
> + ;;
> + *)
> + current_feature=""
> + ;;
> + esac
> + ;;
> + description:)
> + if [ -n "$current_feature" ]; then
> + rest=${rest%\'*}
> + printf " %-15s %s\n" "$current_feature" "${rest#\'}"
> + fi
> + ;;
> + *)
> + current_feature=""
> + ;;
> + esac
> +done < "$source_path/meson_options.txt" | sort
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH v2 0/5] Use meson_options.txt in the configure script, Thomas Huth, 2021/09/03
- [PATCH v2 2/5] meson_options.txt: Switch the default value for the vnc option to 'auto', Thomas Huth, 2021/09/03
- [PATCH v2 1/5] configure: Add the possibility to read options from meson_options.txt, Thomas Huth, 2021/09/03
- [PATCH v2 4/5] configure: Get help text from meson_options.txt, Thomas Huth, 2021/09/03
- Re: [PATCH v2 4/5] configure: Get help text from meson_options.txt,
Eric Blake <=
- [PATCH v2 3/5] configure: Remove options that can be handled via meson_options.txt instead, Thomas Huth, 2021/09/03
- [PATCH v2 5/5] meson_options.txt: Document that "configure" reads this file, too, Thomas Huth, 2021/09/03