[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ifdef not allowed
From: |
Ralf Corsepius |
Subject: |
Re: ifdef not allowed |
Date: |
06 Nov 2001 22:02:07 +0100 |
Am Die, 2001-11-06 um 20.53 schrieb Karl Eichwalder:
> Hello,
>
> I'm wondering why automake doesn't allow conditionals like:
>
> f=$(shell test -e /etc/passwd && echo /etc/passwd)
> hello:
> echo hello
> ifdef f
> echo $(f)
> endif
>
> Reading the automake manual on Conditionals I have got the impression,
> only 'if' is allowed. Why not passing through 'ifdef' structures?
Probably, simply syntactical ambiguity between make-conditionals and
automake-conditionals, i.e. badly chosen grammar and nobody wanting to
care.
But remember, automake's objective is portable Makefiles, while you seem
to be trying to use proprietary and non-portable gmake-style
conditionals.
> At
> least, please improve the error message:
>
> Makefile.am:24: endif without if
>
> It took me quite some time to understand what automake wants me to do ;)
>
> [Yes, I know, it's easily possible to solve the job mentioned above
> going other ways.]
One way to work around this issue is to put something like this into
configure.acs:
ENDIF=endif
AC_SUBST(ENDIF)
and to apply this in Makefile.ams:
ifdef f
..
@ENDIF@
Ralf
- ifdef not allowed, Karl Eichwalder, 2001/11/06
- Re: ifdef not allowed,
Ralf Corsepius <=