Here's a simple command that works fine in my bash shell:
echo "Created at: $(date)" >> README.md
It appends Created at: Wed Jan 24 10:04:48 STD 2018
to README.md.
However, ii I include the same command in my makefile, the behavior is different.
makefile:
README.md:
echo "Created at: $(date)" >> README.md
Running make README.md
will treat the command substitution as an empty string like this:
echo "Created at: " >> README.md
What's appended to README.md is Created at:
.
How do I get command substitution to output properly with echo in a makefile?