This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
automake strips GNU make "else/endif" conditionals
- To: automake at gnu dot org
- Subject: automake strips GNU make "else/endif" conditionals
- From: "Peter J. Farley III" <pjfarley at dorsai dot org>
- Date: Sun, 05 Aug 2001 17:34:15 -0400
- List-Id: Discussion list for automake <automake.gnu.org>
Hi all,
I'm learning automake (slowly). Here's my problem: I have a
Makefile.am where I want to use GNU make conditionals (to be executed
and resolved at make time, not at automake time), with syntax like
this:
thisrule::
ifdef THISVAR
@echo "what to do when THISVAR is defined at make time"
else
@echo "what to do when THISVAR is NOT defined at make time"
endif
@echo "and this is another action to take at make time"
Unfortunately, automake strips the "else" and "endif" lines, leaving
the ifdef alone, and of course GNU make then complains that there is a
missing "endif" in the resulting make file.
Is it possible to use GNU make conditionals in a Makefile.am file and
have them passed into Makefile.in (and thence to Makefile)
unchanged? Is this a bug, or WAD for automake?
I'm using automake 1.4 (DJGPP version) and perl 5.6.1 (also DJGPP).
I would have searched the automake list archives, but I couldn't find a
web search facility, and I'm on a slow 56K (usually 48K)
connection. Sorry if this has been discussed before.
TIA for any help, RTFM, archive pointers, or info you can provide.
---------------------------------------------------------
Peter J. Farley III (pjfarley@dorsai.org)