[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
can't change variable value
From: |
Mikhail Kruk |
Subject: |
can't change variable value |
Date: |
Wed, 30 Oct 2002 19:29:20 -0500 (EST) |
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
- can't change variable value,
Mikhail Kruk <=