This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

automake strips GNU make "else/endif" conditionals


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)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]