help-make
[Top][All Lists]
Advanced

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

When the branch can not be corrected selected by ifeq?


From: Peng Yu
Subject: When the branch can not be corrected selected by ifeq?
Date: Wed, 30 Jul 2008 21:35:04 -0500

Hi,

I have the following Makefile. The execution result is shown below.

CXX_SOURCE_FILES is an empty string. I think that the top branch
should be taken.  But in fact, the bottom one is taken.

Would you please let me know what I'm wrong?

Thanks,
Peng

$ cat Makefile
.PHONY: all

CXX_SOURCE_FILES =

ifeq ($CXX_SOURCE_FILES, )

all:
        @echo x$(CXX_SOURCE_FILES)y

else

all:
        @echo X$(CXX_SOURCE_FILES)Y

endif

$ make
XY




reply via email to

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