emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build failures in mingw64


From: Angelo Graziosi
Subject: Re: build failures in mingw64
Date: Sun, 9 Jul 2023 12:01:56 +0200 (CEST)

> Il 09/07/2023 11:33 CEST Angelo Graziosi ha scritto:
> 
>  
> > Il 09/07/2023 10:51 CEST Eli Zaretskii ha scritto:
> > 
> >  
> > > Date: Sun, 9 Jul 2023 10:05:13 +0200 (CEST)
> > > From: Angelo Graziosi
> > > 
> > > I just noticed this in configure:
> > > 
> > >    checking whether MB_CUR_MAX is correct... ./configure: line 33322: 
> > > test: !=: unary operator expected
> > 
> > Please show the relevant part of the configure script.  Since the
> > configure is generated on each user's system as part of the build, it
> > is hard to guess what you have there without seeing the actual code
> > you get.  For example, on my system, line 33322 of the configure
> > script is an empty line, and I see no "!=" anywhere around that.
> > 
> > So more data is needed to investigate this.
> 
> This should be:
> 
> [...]
> 
>   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether MB_CUR_MAX 
> is correct" >&5
> printf %s "checking whether MB_CUR_MAX is correct... " >&6; }
> if test ${gl_cv_macro_MB_CUR_MAX_good+y}
> then :
>   printf %s "(cached) " >&6
> else $as_nop
> 
>                   case "$host_os" in
>                   # Guess no on Solaris.
>         solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
>                   # Guess yes otherwise.
>         *)        gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
>       esac
>       if test $LOCALE_FR_UTF8 != none; then   ### *** LINE 33322 *** ###
>         if test "$cross_compiling" = yes
> then :
>   :
> else $as_nop
>   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> 
> 
> [...]
> 

I played a bit from command line:

1)
$ A=1
$ if test $A != 1; then echo bar; fi
<EMPTY>

$ if test $A != none; then echo bar; fi
bar

2)
$ A=
$ if test $A != none; then echo bar; fi
bash: test: !=: atteso operatore unario

but:

$ if test "$A" != none; then echo bar; fi
bar


i.e. it prints that message if the variable is undefined and not quoted..

Here it is:

$ bash --version
GNU bash, versione 5.2.15(1)-release (x86_64-pc-msys)
[...]


See also: https://linuxconfig.org/correct-variable-parsing-and-quoting-in-bash


> > Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]