Nickolas Lloyd wrote:
In bash at least using double-quotes results in the evaluation of symbols, whereas single-quotes doesn't. I suspect it's the same for make.
make expands $() regardless of whether it is inside quotes or not. make doesn't do much parsing, after expansion the command is passed to sh:
$ cat Makefile X:=bar
.PHONY: x x: @echo "foo $(X) baz" $ strace -fF make 2>&1 | grep echo read(3, "X:=bar\n\n.PHONY: x\nx:\n\t@echo "foo "..., 4096) = 43 [pid 29660] execve("/bin/sh", ["/bin/sh", "-c", "echo "foo bar baz""], [/* 51 vars */]) = 0
I can change it if you like though.
Better keep it inside the quotes, so that weird names will not mess up the shell, if we'll ever have any names like that.
Acked-by: Peter Stuge peter@stuge.se
//Peter