Browse Source

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>
master
Anna 5 years ago
parent
commit
c62bd2ade6
  1. 15
      Makefile

15
Makefile

@ -1,14 +1,17 @@ @@ -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)/

Loading…
Cancel
Save