One Makefile target is supposed to be in charge of:grabbing the output of $ perl Markdown.pl src/index.md (markdown to html)using that string to replace one line, something like CONTENT originating in the file src/template.html. There's no other line with that row in template.html.What's an elegant way to achieve this?
Replace one line with STDIN in a Makefile
bash;sed;awk;make
Like arcege said, don't modify the actual source file. Anyway, this is much easier with awk:target:    awk '{if($$0==CONTENT){system(perl Markdown.pl src/index.md)}else{print}}' src/template.html > build/template.htmlYou can put that awk code into a script if you want to make the line look a bit cleaner. (If you do, change $$0 to $0, it's necessary because otherwise the makefile interprets it)target:    awk -f convert.awk src/template.html > build/template.html