hi, 
I have a makefile where I want to conditionally provide the macros.
I am working on Solaris7 and am on Bash shell. 

I have seen different flavors of the conditional if statement at various
sites on the Internet including the GNU site, but none seem to work. I am
providing the same of code which needs to be executed conditionally. Hope
someone can help me spot the error

BUILD=DEBUG
--------------
--------------

ifeq ($BUILD),DEBUG)
CFLAGS   = -g -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
 CXXFLAGS = -g -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
 else
 CFLAGS   = -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
 CXXFLAGS = -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED
endif

I have also tried other syntax like the following:

if [ ${BUILD} == DEBUG ] ; then \
CFLAGS   = -g -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ; \
CXXFLAGS = -g -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ; \
else \
 CFLAGS   = -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ;\
 CXXFLAGS = -mt -KPIC  -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED ;\
fi

Any help would be greatly appreciated!

thanks a lot/
Suman


Suman Ojha
Firstlogic Inc.
608-788-8154 (3167)
www.firstlogic.com



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to