diff options
author | Akihiko Odaki <akihiko.odaki@gmail.com> | 2022-06-25 00:40:42 +0900 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-07-13 16:58:57 +0200 |
commit | 8154f5e64b0cfb836803ec6c11360075be66cd00 (patch) | |
tree | 82ddedbd9cf376f0991ec2c73020628ff8e78223 /scripts/meson-buildoptions.py | |
parent | 98753e9a8fc1791b60f1a674452ceb1184eb613a (diff) |
meson: Prefix each element of firmware path
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220624154042.51512-1-akihiko.odaki@gmail.com>
[Rewrite shell function without using Bash extensions. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/meson-buildoptions.py')
-rwxr-xr-x | scripts/meson-buildoptions.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index e624c16b01..3e2b478538 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -156,7 +156,7 @@ def cli_metavar(opt): if opt["type"] == "string": return "VALUE" if opt["type"] == "array": - return "CHOICES" + return "CHOICES" if "choices" in opt else "VALUES" return "CHOICE" @@ -199,7 +199,10 @@ def print_parse(options): key = cli_option(opt) name = opt["name"] if require_arg(opt): - print(f' --{key}=*) quote_sh "-D{name}=$2" ;;') + if opt["type"] == "array" and not "choices" in opt: + print(f' --{key}=*) quote_sh "-D{name}=$(meson_option_build_array $2)" ;;') + else: + print(f' --{key}=*) quote_sh "-D{name}=$2" ;;') elif opt["type"] == "boolean": print(f' --enable-{key}) printf "%s" -D{name}=true ;;') print(f' --disable-{key}) printf "%s" -D{name}=false ;;') |