diff options
author | Akihiko Odaki | 2022-06-24 17:40:42 +0200 |
---|---|---|
committer | Paolo Bonzini | 2022-07-13 16:58:57 +0200 |
commit | 8154f5e64b0cfb836803ec6c11360075be66cd00 (patch) | |
tree | 82ddedbd9cf376f0991ec2c73020628ff8e78223 /scripts | |
parent | module: Use bundle mechanism (diff) | |
download | qemu-8154f5e64b0cfb836803ec6c11360075be66cd00.tar.gz qemu-8154f5e64b0cfb836803ec6c11360075be66cd00.tar.xz qemu-8154f5e64b0cfb836803ec6c11360075be66cd00.zip |
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')
-rwxr-xr-x | scripts/meson-buildoptions.py | 7 | ||||
-rw-r--r-- | scripts/meson-buildoptions.sh | 4 |
2 files changed, 7 insertions, 4 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 ;;') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 4b7b8ffaa2..359b04e0e6 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -42,7 +42,7 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=CHOICES' printf "%s\n" ' Set available tracing backends [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)' - printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [share/qemu-firmware]' + printf "%s\n" ' --firmwarepath=VALUES search PATH for firmware files [share/qemu-firmware]' printf "%s\n" ' --iasl=VALUE Path to ACPI disassembler' printf "%s\n" ' --includedir=VALUE Header file directory [include]' printf "%s\n" ' --interp-prefix=VALUE where to find shared libraries etc., use %M for' @@ -363,7 +363,7 @@ _meson_option_parse() { --disable-qcow1) printf "%s" -Dqcow1=disabled ;; --enable-qed) printf "%s" -Dqed=enabled ;; --disable-qed) printf "%s" -Dqed=disabled ;; - --firmwarepath=*) quote_sh "-Dqemu_firmwarepath=$2" ;; + --firmwarepath=*) quote_sh "-Dqemu_firmwarepath=$(meson_option_build_array $2)" ;; --enable-qga-vss) printf "%s" -Dqga_vss=enabled ;; --disable-qga-vss) printf "%s" -Dqga_vss=disabled ;; --enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=true ;; |