qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/4] configure: simplify calls to meson_quote
Date: Mon, 8 Nov 2021 10:02:45 +0100	[thread overview]
Message-ID: <e03ca933-c516-3a23-36c0-d084f04332e9@redhat.com> (raw)
In-Reply-To: <20211108084323.541961-2-pbonzini@redhat.com>

On 08/11/2021 09.43, Paolo Bonzini wrote:
> 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.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index 33682cb971..369b5455b6 100755
> --- a/configure
> +++ b/configure
> @@ -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
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-11-08  9:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  8:43 [PATCH 0/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests Paolo Bonzini
2021-11-08  8:43 ` [PATCH 1/4] configure: simplify calls to meson_quote Paolo Bonzini
2021-11-08  9:02   ` Thomas Huth [this message]
2021-11-08  8:43 ` [PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status Paolo Bonzini
2021-11-08  9:04   ` Thomas Huth
2021-11-08  8:43 ` [PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests Paolo Bonzini
2021-11-08  9:11   ` Thomas Huth
2021-11-08 11:07     ` Paolo Bonzini
2021-11-08  8:43 ` [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars Paolo Bonzini
2021-11-08  9:17   ` Thomas Huth
2021-11-08  9:17   ` Philippe Mathieu-Daudé
2021-11-08 10:45     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e03ca933-c516-3a23-36c0-d084f04332e9@redhat.com \
    --to=thuth@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).