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)/