Hi all,

Is it possible to prevent a variable from being exported to sub-makes?
Below is the example:

============================================
$(warning "selector: $(selector)")
ifneq ($(selector),)
override selector :=
endif
$(warning "selector: $(selector)")

aaa:
        $(MAKE) selector=abc bbb

bbb:
        $(MAKE) ccc

ccc:
============================================

The "make aaa" command produces the following output:
Makefile:1: "selector: "
Makefile:5: "selector: "
make selector=abc bbb
make[1]: Entering directory `/home/avn/tmp'
Makefile:1: "selector: abc"
Makefile:5: "selector: "
make ccc
make[2]: Entering directory `/home/avn/tmp'
Makefile:1: "selector: abc"
Makefile:5: "selector: "
make[2]: Nothing to be done for `ccc'.
make[2]: Leaving directory `/home/avn/tmp'
make[1]: Leaving directory `/home/avn/tmp'

That is, the lowest sub-make receives selector=abc, though the 2nd 
sub-make overrided it with empty string. Is it right behavior? If so, 
how could one prevent a variable from being exported to sub-make 
processes? (unexport selector does not help either).

Regards,
Alexey.

-- 
All are welcome to our nest.
We are Pkunk, we cannot help but love all.
                        -- Pkunks, SC2


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

Reply via email to