Follow-up Comment #2, bug #67265 (group make): Hi,
Make always expands a command before executing it in the shell - this is why
your $(file) is getting done before mkdir.
I don't think you need $(file) here at all since you can use the shell to
create a file with something like
mkdir -p test.d
echo '$(contents)' > test.d/test.txt
You might have some trouble with newlines. In that case you could try:
contents:=hello world\n
all:
mkdir -p test.d
echo -e '$(contents)' > test.d/test.txt
.PHONY: all
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67265>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
