我有一個包含許多乳膠文檔的文件夾scructure。我認爲所有.tex
文件可以被建立,除非它們與00-
前綴的文件夾下:在makefile中指定重建策略
./presentation/slide.tex → BUILD
./presentation/section/1-introduction.tex → BUILD
./presentation/00-assets/packages.tex → DONT BUILD
我的Makefile是相當簡單:
CC := latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make
all: makefile
@find -L . -not -path "*/.*" -not -path "*/00-*" -name "*.tex" -execdir $(MAKE) -f $(PWD)/makefile {} \;
%.tex:
$(CC) [email protected]
不幸的是,我沒有它不工作知道如何指定產品是%.pdf
,並且%.tex
是輸入文件。如果.pdf
文件不存在,或者源文件自上次構建以來已被修改,我不知道如何指定必須構建源文件。
任何人都可以幫助我嗎?
'-output-directory $(@ D)'在解析相對路徑時會導致問題。我發現'-cd'選項更有用。 無論如何您的答案! – Amxx