> md> $ make > md> makefile:2: FOO = foo > md> makefile:5: FOO = foo bar > md> makefile:9: FOO = foo bar biz > md> FOO = boz baz / $FOO = > > Oh whoops... I should have added "export FOO" to the makefile. > > md> $ setenv FOO gig > md> $ make > md> makefile:2: FOO = gig foo > md> makefile:5: FOO = gig foo bar > md> makefile:9: FOO = gig foo bar biz > md> FOO = boz baz / $FOO = boz baz > > md> Why in the second case "/ $FOO" prints "boz baz" and not the empty > md> string? > > Make automatically exports all variables that were in the environment > when it started up. It doesn't export other, normal make variables. > > So, by adding FOO to the environment before you started make you caused > it to be exported.
I have no problem seeing what happens with make -e, but I don't get why make prints $$FOO as empty in he first example and "boz baz" in the second. I guess I don't understand what happens behind the curtains when "Make automatically exports all variables that were in the environment ...". Thanks, Martin _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
