Is it possible to "unset" an environment variable in a Makefile? -


I am using GNU Make, and that project also includes a third party library that has a build system, Code> CFLAS is defined in the environment when it is called I have defined CFLAS in my environment for other reasons, the library is being constructed with another makefile, So I say:

Third party: $ (make) -f makefile. 3rd party

But I'm sure that CFLAG can not be unset when I want to call the third party makefile The closest thing I can get:

CFLAG: =

But it still sets CFLAG in the environment, it's just a blank string to say Apart from doing something disgusting as well:

Third party: bash -c "unset CFLAGS; $ (make) -f MacFile 3rd party"

In Scope is an easy way to CFLAGS variable "unset" within the primary Mesefail, so it does not exist on the environment when you applied the Library of third parties?

Does not the following work for you?

  unexport CFLAGS 3rdparty: $ (Make) - Makefile.3rdparty  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -