From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Call for port reports |
Date: | 2003-10-31 16:20:57 |
Message-ID: | 200310311620.h9VGKvx27771@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > One other idea would be to set CFLAGS to "" before including template,
> > and just test to see if it is still "" after --- that might be cleaner
> > than saving the original value and comparing.
>
> Yeah, that bothered me a bit too --- what if the template tries to set
> CFLAGS to its already-existing value? I was thinking that unsetting
> CFLAGS before running the template would be the best answer.
I assume he did it that way so if you do:
CFLAGS=
in the template file that it would be honored. I see lots of this in
configure:
ac_env_CFLAGS_set=${CFLAGS+set}
but that uses 'set' if the variable is null or unset:
${parameter:+word}
Use Alternate Value. If parameter is null or
unset, nothing is substituted, otherwise the expan-
sion of word is substituted.
However, I thought null meant "", but I now think null basically means
the same as unset in this manual page. Notice that '+' tests only for
unset, and knows when you have done VAR= and VAR="":
$ echo ${Y+no}
$ Y=
$ echo ${Y+no}
no
$ Y=""
$ echo ${Y+no}
no
$ unset Y
$ echo ${Y+no}
$
so the proper test would be to unset the variable, then use ${var+val}
to test CFLAGS after the template file is included.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-31 16:24:36 | Re: 7.4RC1 planned for Monday |
Previous Message | Stephen | 2003-10-31 16:11:53 | Re: Experimental patch for inter-page delay in VACUUM |