autoconf
[Top][All Lists]
Advanced

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

RE: Success (mostly) with the testsuite


From: Bernard Dautrevaux
Subject: RE: Success (mostly) with the testsuite
Date: Fri, 20 Oct 2000 18:22:04 +0200

> -----Original Message-----
> From: David Morgan [mailto:address@hidden
> Sent: Friday, October 20, 2000 6:10 PM
> To: address@hidden
> Cc: Akim Demaille; Pavel Roskin; address@hidden
> Subject: Re: Success (mostly) with the testsuite
> 
> 
> Hi Lars,
> 
> "Lars J. Aas" wrote:
> > 
> > On Fri, Oct 20, 2000 at 08:57:50AM -0700, David Morgan wrote:
> > : Hi Lars,
> > :
> > : "Lars J. Aas" wrote:
> > : >
> > : > On Fri, Oct 20, 2000 at 08:41:49AM -0700, David Morgan wrote:
> > : > : > test ${FOO+set} = set || FOO=$foo
> > : > :
> > : > : I just tried you proposed change and I get a syntax 
> error from:
> > : > :
> > : > : test ${CONFIG_FILES+$config_files} = $config_files || 
> CONFIG_FILES=$config_files
> > : >
> > : > Use "set" verbatim like Akim wrote - don't interpret it 
> as the set of config files...
> > : >
> > :
> > : I still get a syntax error with:
> > :
> > : test ${CONFIG_FILES+set} = set || CONFIG_FILES=$config_files
> > 
> > OK, this then:
> > 
> > test s${CONFIG_FILES+et} = set || CONFIG_FILES=$config_files
> > 
> This works !!!!

Hi all,

I usually use the following construct, to protect against any kind of value
for FOO, be it empty or starting with a special character:

test X"${FOO+set}" = X"set" || FOO=$foo

I know here FOO is never expanded if it's not unset, so cannot be expanded
as '-', but I also use the same construct as:

test X"${FOO}" = X"something" || FOO=$foo

and I'm so used at typing the X"..." that I type them quite automatically...
also some of the quotes may not be needed (if something is not some thing :)
:) :) ), but it seems more readable that way :-)

Regards,

        Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:    +33 (0) 1 47 68 80 80
Fax:    +33 (0) 1 47 88 97 85
e-mail: address@hidden
                address@hidden
-------------------------------------------- 



reply via email to

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