Hi, I have 3 questions related to if-conditionals:
1) I wonder, why are there never spaces after commas in the manual, like for example here: ifeq ($(CC),gcc). Is it OK to put spaces after commas (I guess yes)? 2) How do you test for OR-conditions? 3) How do you search for a string, ignoring the case? 4) http://www.gnu.org/software/make/manual/html_node/make_77.html says "Extra spaces are allowed and ignored at the beginning of the conditional directive line, but a tab is not allowed." Does it mean the tab in front of "if" word or also in the statements (i.e. may I indent the CXXFLAGS below)? And here is my actuall problem - I have 3 cases: 1) If a EKERN is found in EXPORTLIBRARY *OR* (how?) KSRT found in TARGET (case-insensitive) 2) If ALWAYS_BUILD_AS_ARM equals 1 3) default In the Makefile below I had to write the first case twice, because I don't know, how to make an OR-conditional. And still it doesn't work if the case doesn't match. What should I do here? Test for eKERN, ekERN, etc. ?? bolinux72:make-test {75} cat Makefile ALWAYS_BUILD_AS_ARM = 1 EXPORTLIBRARY = /blah/EKERN/blah TARGET = ksrt.lib ifeq (EKERN, $(findstring EKERN, $(EXPORTLIBRARY))) CXXFLAGS = --arm --no_exceptions --no_exceptions_unwind else ifeq (KSRT, $(findstring KSRT, $(TARGET))) CXXFLAGS = --arm --no_exceptions --no_exceptions_unwind else ifeq (1, $(ALWAYS_BUILD_AS_ARM)) CXXFLAGS = --arm --fpu softvfp --exceptions --exceptions_unwind else CXXFLAGS = --thumb --fpu softvfp --exceptions --exceptions_unwind -D__MARM_THUMB__ endif endif endif $(warning $(CXXFLAGS)) all: bolinux72:make-test {76} gmake EXPORTLIBRARY=/blah/ekern/blah Makefile:19: --arm --fpu softvfp --exceptions --exceptions_unwind gmake: Nothing to be done for `all'. Regards Alex
Makefile
Description: Makefile
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make
