带有引用文件的pandoc的Makefile
我正在尝试为pandoc编写一个Makefile。我希望能够键入带有引用文件的pandoc的Makefile,makefile,pandoc,Makefile,Pandoc,我正在尝试为pandoc编写一个Makefile。我希望能够键入makefilename.ext,并且Makefile将自动从filename.txt编译到filename.ext。文件名可以是任何名为.txt的文件。这部分很简单。e、 g.我有一套规则,如: %.pdf: %.txt pandoc -s --smart -f markdown -o $@ $< %.html: %.txt pandoc -s --smart --bibliography $(bib) -
makefilename.ext
,并且Makefile将自动从filename.txt
编译到filename.ext
。文件名可以是任何名为.txt的文件。这部分很简单。e、 g.我有一套规则,如:
%.pdf: %.txt
pandoc -s --smart -f markdown -o $@ $<
%.html: %.txt
pandoc -s --smart --bibliography $(bib) -f markdown -t html --standalone -o $@ $<
%.docx: %.txt
pandoc -s --smart --bibliography references.bib -f markdown -t docx -o $@ $<
%.tex: %.txt
pandoc -s --smart --bibliography references.bib -o $@ $<
。。。但我不知道如何从fudge.txt获取fudge.bib,除非执行以下操作:
pandoc -s --smart --bibliography $(subst .txt,.bib,$<) -f markdown -o $@ $<
pandoc-s--smart--书目$(subst.txt,.bib,$pandoc-s--smart--书目$*.bib-f markdown-o$@$<
pandoc -s --smart --bibliography $(subst .txt,.bib,$<) -f markdown -o $@ $<
pandoc -s --smart --bibliography $*.bib -f markdown -o $@ $<