Hi,
I want to run my make like this:
make BUILDTYPE=release
to build release version and any other invokation of make should build 
debug version. 

So I have the following code in makefile:

ifneq ($(BUILDTYPE), release)
        export BUILDTYPE = debug
        CC = cc -g
else
        CC = cc -O3
endif
...

This works for 'make BUILDTYPE=release'
this also works for 'make' (BUILDTYPE gets assigned 'debug' value)
However if I run it like 'make BUILDTYPE=blah' BUILDTYPE will preserve the 
value 'blah'. 
Recursive invokation of make is done, so I suspect this might be at fault.

GNU/Linux 2.4.7-10,
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-redhat-linux-gnu

-mk



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

Reply via email to