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:
parent
4182c9aa57
commit
c62bd2ade6
15
Makefile
15
Makefile
|
@ -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)/
|
||||
|
|
Caricamento…
Fai riferimento in un nuovo problema