Cheesemaking Worksheets

Makefile 329B

1234567891011121314151617
  1. OUTPUT = build
  2. TEX = latexmk --output-directory=$(OUTPUT)/
  3. SOURCES := $(shell find -name '*.tex' | sort)
  4. PDFS := $(shell find -name '*.tex' | sed 's/.tex$$/.pdf/' | sort)
  5. %.pdf: %.tex
  6. $(TEX) $<
  7. cheese:
  8. $(TEX) -recorder -pdf $(SOURCES)
  9. cp build/*.pdf .
  10. pdfjoin -o worksheets.pdf $(PDFS)
  11. clean:
  12. rm *.pdf
  13. rm -r $(OUTPUT)/