On 14 March 2016 at 14:55, Martin Reinders <mar...@helios.de> wrote: > On 14.03.16 14:56, Tim Murphy wrote: > > Functions and variables are expanded before the command and list of > > variables is sent to the shell to be executed. Hence $(file) happens > > before your echo command is executed. > > That makes sense now, thank you very much. > > > Why would you use $(file) in a commandline anyhow? > > Well, my idea was to use $(file) as a replacement for the "echo" command > in a Makefile which is used both on Unix and Windows, since the > escaping/quoting rules are a bit different between those platforms. > > Your and Paul's feedback helped a lot to understand the problem, and I > will now probably refrain from using $(file) for _that_ purpose. > > That's a great reason for wanting to do that. I certainly think it would be immensely useful if make had some sort of very limited shell that would allow x-platform makefiles to be created without a lot of ifdefs or special variables.
Regards, Tim _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make