[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Variable substutution for conditionals
From: |
Paul D. Smith |
Subject: |
Re: Variable substutution for conditionals |
Date: |
Fri, 1 Apr 2005 17:38:34 -0500 |
%% address@hidden writes:
b> The GCC make requires ifeq else and endif. If I change the !IF
b> !ELSE !ENDIF conditionals to ifeq else endif the make file will
b> work (after adding code for the Linux flag settings). However, I
b> want to have just one make file regardless of the compiler or OS
b> being used.
Of course, GNU make supports Windows and OS/2 as well, so one option
would be to use it for all your platforms.
b> I tried setting environment variables for ifeq else endif and then
b> using the variables in the make file, i.e. (from the bash shell).
b> IFEQ=ifeq
b> $(IFEQ) "$(PLATFORM)" "OS2"
No, this won't work.
b> Can I assume that the conditionals cannot be substituted with
b> variables?
Correct. Make looks for the static keywords "ifeq", etc. It doesn't
expand the line before looking for these items.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist