automake
[Top][All Lists]
Advanced

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

Re: What is meant by, "XXX does not appear in AM_CONDITIONAL"?


From: Stepan Kasal
Subject: Re: What is meant by, "XXX does not appear in AM_CONDITIONAL"?
Date: Mon, 10 Jan 2005 15:00:27 +0100
User-agent: Mutt/1.4.1i

Hi

On Sat, Jan 08, 2005 at 03:21:44PM -0800, Bruce Korb wrote:
> [`some-shell-script-test`
> if test $? -eq 0
> then]
> AM_CONDITIONAL([XXX], [true])
> [else]
> AM_CONDITIONAL([XXX],[false])
> [fi]

one usually relies that `else', `fi', etc. are not m4 macros.
So it's usually enough to  write

[some-shell-script-test]
if test $? -eq 0
then
  AM_CONDITIONAL([XXX], [true])
else
  AM_CONDITIONAL([XXX], [false])
fi

Well, I'd use

if [some-shell-script-test]
then
  ...
  AM_CONDITIONAL([XXX], [true])
else
  ...
  AM_CONDITIONAL([XXX], [false])
fi

in cases when at least one of the alternatives requires additional code to
bve put insted of the `...'

If you have no such code, I see no reason why not to use the simple

AM_CONDITIONAL([XXX], [[some-shell-script-test]])

note the double quote: the inner pair prevents expanding of macros in the
test code, if you need it.

HTH,
        Stepan Kasal




reply via email to

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