diff options
author | Paolo Bonzini | 2021-11-05 10:07:37 +0100 |
---|---|---|
committer | Paolo Bonzini | 2021-11-08 12:19:55 +0100 |
commit | ac7ebcc589757af7de0a7cba68126a80224fb989 (patch) | |
tree | cc6fe0e110d4e1f3270c9cb4def06452d367d20f | |
parent | docs: adjust for demise of scripts/create_config (diff) | |
download | qemu-ac7ebcc589757af7de0a7cba68126a80224fb989.tar.gz qemu-ac7ebcc589757af7de0a7cba68126a80224fb989.tar.xz qemu-ac7ebcc589757af7de0a7cba68126a80224fb989.zip |
configure: simplify calls to meson_quote
meson_quote assumes a non-empty argument list, and incorrectly returns a
one-entry array if passed nothing. Move the check for an empty argument
list from the invocations to the function itself.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-x | configure | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -3894,6 +3894,7 @@ echo "TOPSRC_DIR=$source_path" >> $config_mak if test "$skip_meson" = no; then cross="config-meson.cross.new" meson_quote() { + test $# = 0 && return echo "'$(echo $* | sed "s/ /','/g")'" } @@ -3908,10 +3909,10 @@ if test "$skip_meson" = no; then test -z "$cxx" && echo "link_language = 'c'" >> $cross echo "[built-in options]" >> $cross - echo "c_args = [${CFLAGS:+$(meson_quote $CFLAGS)}]" >> $cross - echo "cpp_args = [${CXXFLAGS:+$(meson_quote $CXXFLAGS)}]" >> $cross - echo "c_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross - echo "cpp_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross + echo "c_args = [$(meson_quote $CFLAGS)]" >> $cross + echo "cpp_args = [$(meson_quote $CXXFLAGS)]" >> $cross + echo "c_link_args = [$(meson_quote $LDFLAGS)]" >> $cross + echo "cpp_link_args = [$(meson_quote $LDFLAGS)]" >> $cross echo "[binaries]" >> $cross echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross |