Improvements to the build system

Make sure the top level directory contains the resulting PDFs, but keep
the intermediate build files in a separate directory to reduce clutter.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2017-04-21 14:02:17 -04:00
父節點 4182c9aa57
當前提交 c62bd2ade6
共有 1 個文件被更改,包括 9 次插入6 次删除

查看文件

@ -1,14 +1,17 @@
TEX = latexmk -recorder -pdf
OUTPUT = build
TEX = latexmk --output-directory=$(OUTPUT)/
SOURCES := $(shell find -name '*.tex' | sort)
PDFS := $(shell find -name '*.tex' | sed 's/.tex$$/.pdf/' | sort)
%.pdf: %.tex
$(TEX) $<
cheese:
$(TEX) -outdir=cheese/ *.tex
pdfjoin -o cheese.pdf cheese/*.pdf
$(TEX) -recorder -pdf $(SOURCES)
cp build/*.pdf .
pdfjoin -o worksheets.pdf $(PDFS)
clean:
latexmk -C
rm -r cheese/
rm cheese.pdf
rm *.pdf
rm -r $(OUTPUT)/