automake
[Top][All Lists]
Advanced

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

automake strips GNU make "else/endif" conditionals


From: Peter J. Farley III
Subject: automake strips GNU make "else/endif" conditionals
Date: Sun, 05 Aug 2001 17:34:15 -0400

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 (address@hidden)




reply via email to

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