xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [[PATCH v2 for-4.14]] m4: use test instead of []
@ 2020-06-02  9:01 Wei Liu
  2020-06-02  9:14 ` Paul Durrant
  2020-06-02  9:59 ` Roger Pau Monné
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Liu @ 2020-06-02  9:01 UTC (permalink / raw)
  To: Xen Development List
  Cc: paul, Roger Pau Monne, Ian Jackson, Wei Liu, Bertrand Marquis

It is reported that [] was removed by autoconf, which caused the
following error:

  ./configure: line 4681: -z: command not found

Switch to test. That's what is used throughout our configure scripts.
Also put the variable expansion in quotes.

Signed-off-by: Wei Liu <wl@xen.org>
Reported-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
Fixes: 8a6b1665d987 ("configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS")
Signed-off-by: Wei Liu <wl@xen.org>
---
v2: Address Ian's comment.

Run autogen.sh before committing.

Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Cc: paul@xen.org
---
 m4/set_cflags_ldflags.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/set_cflags_ldflags.m4 b/m4/set_cflags_ldflags.m4
index 08f5c983cc63..23706e256b42 100644
--- a/m4/set_cflags_ldflags.m4
+++ b/m4/set_cflags_ldflags.m4
@@ -15,7 +15,7 @@ for ldflag in $APPEND_LIB
 do
     APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag"
 done
-if [ ! -z $EXTRA_PREFIX ]; then
+if test ! -z "$EXTRA_PREFIX" ; then
     CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include"
     LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib"
 fi
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [[PATCH v2 for-4.14]] m4: use test instead of []
  2020-06-02  9:01 [[PATCH v2 for-4.14]] m4: use test instead of [] Wei Liu
@ 2020-06-02  9:14 ` Paul Durrant
  2020-06-02  9:59 ` Roger Pau Monné
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Durrant @ 2020-06-02  9:14 UTC (permalink / raw)
  To: 'Wei Liu', 'Xen Development List'
  Cc: 'Roger Pau Monne', 'Ian Jackson',
	'Bertrand Marquis'

> -----Original Message-----
> From: Wei Liu <wl@xen.org>
> Sent: 02 June 2020 10:02
> To: Xen Development List <xen-devel@lists.xenproject.org>
> Cc: Wei Liu <wl@xen.org>; Bertrand Marquis <Bertrand.Marquis@arm.com>; Roger Pau Monne
> <roger.pau@citrix.com>; paul@xen.org; Ian Jackson <ian.jackson@eu.citrix.com>
> Subject: [[PATCH v2 for-4.14]] m4: use test instead of []
> 
> It is reported that [] was removed by autoconf, which caused the
> following error:
> 
>   ./configure: line 4681: -z: command not found
> 
> Switch to test. That's what is used throughout our configure scripts.
> Also put the variable expansion in quotes.
> 
> Signed-off-by: Wei Liu <wl@xen.org>
> Reported-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
> Fixes: 8a6b1665d987 ("configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS")
> Signed-off-by: Wei Liu <wl@xen.org>
> ---
> v2: Address Ian's comment.
> 
> Run autogen.sh before committing.
> 
> Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>
> Cc: Roger Pau Monne <roger.pau@citrix.com>
> Cc: paul@xen.org

Yes, pretty clearly wrong in the original patch.

Release-acked-by: Paul Durrant <paul@xen.org>

> ---
>  m4/set_cflags_ldflags.m4 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/m4/set_cflags_ldflags.m4 b/m4/set_cflags_ldflags.m4
> index 08f5c983cc63..23706e256b42 100644
> --- a/m4/set_cflags_ldflags.m4
> +++ b/m4/set_cflags_ldflags.m4
> @@ -15,7 +15,7 @@ for ldflag in $APPEND_LIB
>  do
>      APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag"
>  done
> -if [ ! -z $EXTRA_PREFIX ]; then
> +if test ! -z "$EXTRA_PREFIX" ; then
>      CPPFLAGS="$CPPFLAGS -I$EXTRA_PREFIX/include"
>      LDFLAGS="$LDFLAGS -L$EXTRA_PREFIX/lib"
>  fi
> --
> 2.20.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [[PATCH v2 for-4.14]] m4: use test instead of []
  2020-06-02  9:01 [[PATCH v2 for-4.14]] m4: use test instead of [] Wei Liu
  2020-06-02  9:14 ` Paul Durrant
@ 2020-06-02  9:59 ` Roger Pau Monné
  2020-06-02 16:47   ` Ian Jackson
  1 sibling, 1 reply; 4+ messages in thread
From: Roger Pau Monné @ 2020-06-02  9:59 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen Development List, paul, Ian Jackson, Bertrand Marquis

There's a double [] enclosure in the subject

On Tue, Jun 02, 2020 at 09:01:38AM +0000, Wei Liu wrote:
> It is reported that [] was removed by autoconf, which caused the
> following error:
> 
>   ./configure: line 4681: -z: command not found
> 
> Switch to test. That's what is used throughout our configure scripts.
> Also put the variable expansion in quotes.
> 
> Signed-off-by: Wei Liu <wl@xen.org>
> Reported-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
> Fixes: 8a6b1665d987 ("configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS")
> Signed-off-by: Wei Liu <wl@xen.org>

There's a double SoB ;)

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks for taking care of this.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [[PATCH v2 for-4.14]] m4: use test instead of []
  2020-06-02  9:59 ` Roger Pau Monné
@ 2020-06-02 16:47   ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2020-06-02 16:47 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Xen Development List, paul, Wei Liu, Bertrand Marquis

Roger Pau Monne writes ("Re: [[PATCH v2 for-4.14]] m4: use test instead of []"):
> There's a double [] enclosure in the subject
> 
> On Tue, Jun 02, 2020 at 09:01:38AM +0000, Wei Liu wrote:
> > It is reported that [] was removed by autoconf, which caused the
> > following error:
> > 
> >   ./configure: line 4681: -z: command not found
> > 
> > Switch to test. That's what is used throughout our configure scripts.
> > Also put the variable expansion in quotes.
> > 
> > Signed-off-by: Wei Liu <wl@xen.org>
> > Reported-by: Bertrand Marquis <Bertrand.Marquis@arm.com>
> > Fixes: 8a6b1665d987 ("configure: also add EXTRA_PREFIX to {CPP/LD}FLAGS")
> > Signed-off-by: Wei Liu <wl@xen.org>
> 
> There's a double SoB ;)
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Pushed, thanks.

Ian.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-02 16:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  9:01 [[PATCH v2 for-4.14]] m4: use test instead of [] Wei Liu
2020-06-02  9:14 ` Paul Durrant
2020-06-02  9:59 ` Roger Pau Monné
2020-06-02 16:47   ` Ian Jackson

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).