%% Eli Zaretskii <[EMAIL PROTECTED]> writes: >> $(warning SHELL=$(SHELL)) >> SHELL := cmd.exe >> $(warning SHELL=$(SHELL)) >> >> And I get: >> Makefile:1: SHELL=C:/mks/mksnt/sh.exe >> Makefile:3: SHELL=C:/mks/mksnt/sh.exe >> >> However, I notice that the behavior for simple commands before setting >> SHELL is the behavior of sh.exe, and the behavior for simple commands >> after setting SHELL is the behavior of cmd.exe. Is this the expected >> behavior or not?
ez> Yes, I think this is expected behavior: you are neglecting the ez> fact that Make first reads the entire Makefile, and at that time ez> all the variables are set and all the non-command parts are ez> evaluated. No, variables are set as soon as the makefile is read. The only question is whether the value that they're set to is evaluated immediately (as above when you use :=) or deferred until later (when you use "=" etc.) In the case above, since the value has no variables or functions in it, it doesn't actually matter. Plus, even if it was deferred, it would be evaluated when the warning function was evaluated. The second $(warning ...) should print "cmd.exe" I would think. But, there's a lot of strange behavior regarding SHELL in DOS/Windows/OS2 that I'm not familiar with. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Make-w32 mailing list [email protected] http://lists.gnu.org/mailman/listinfo/make-w32
