Is it possible to use an anonymous fifo in a Makefile?
I tried it the following way:
%.html: %.txt
pandoc -o $@ <(sed 's%•%*%' $<)
but I get a syntax error from /bin/sh
.
答案 0 :(得分:2)
This make
uses /bin/sh
to execute commands, and /bin/sh
does not understand the <(...)
process substitution syntax.
Luckily, pandoc
does not require a filename on its command line. If no filenames are specified then pandoc
reads from its standard input stream, so you should be able to feed it the output of the sed
command through an ordinary pipe, like this:
sed 's%•%*%' "$<" | pandoc -o "$@"