Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. CORE_PLAYBOOKS := base/bard.pdf base/cleric.pdf base/druid.pdf base/fighter.pdf base/paladin.pdf base/ranger.pdf base/thief.pdf base/wizard.pdf
  2. INVERSE_PLAYBOOKS := inverse/collector.pdf inverse/golem.pdf inverse/lanternbearer.pdf inverse/survivor.pdf
  3. EXTENDED_PLAYBOOKS := extended/priest.pdf extended/artificer.pdf extended/witch.pdf extended/mage.pdf
  4. JOHANSEN_PLAYBOOKS := johansen/archaeologist.pdf johansen/spy.pdf
  5. CUSTOM_PLAYBOOKS := custom/farmer.pdf custom/merchant.pdf
  6. build/chalcedony.pdf: travelrules.pdf build/core-playbooks.pdf build/inverse-playbooks.pdf build/johansen-playbooks.pdf build/extended-playbooks.pdf
  7. @mkdir -p build
  8. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  9. @pdfunite travelrules.pdf travelrules.pdf travelrules.pdf $^ $@
  10. build/core-playbooks.pdf: $(CORE_PLAYBOOKS)
  11. @mkdir -p build
  12. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  13. @pdfunite $^ $@
  14. build/inverse-playbooks.pdf: $(INVERSE_PLAYBOOKS)
  15. @mkdir -p build
  16. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  17. @pdfunite $^ $@
  18. build/extended-playbooks.pdf: $(EXTENDED_PLAYBOOKS)
  19. @mkdir -p build
  20. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  21. @pdfunite $^ $@
  22. build/johansen-playbooks.pdf: $(JOHANSEN_PLAYBOOKS)
  23. @mkdir -p build
  24. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  25. @pdfunite $^ $@
  26. build/custom-playbooks.pdf: $(CUSTOM_PLAYBOOKS)
  27. @mkdir -p build
  28. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  29. @pdfunite $^ $@
  30. %.pdf: %.tex assets/prelude.tex
  31. $(eval TMPDIR := $(shell mktemp -d))
  32. @echo "\033[0;94m[XELATEX]\033[0m $@"
  33. @xelatex -interaction=nonstopmode -output-directory=$(TMPDIR) $< >$(TMPDIR)/log.txt 2>&1 || ( cat $(TMPDIR)/log.txt >&2; exit 1 )
  34. @mv $(TMPDIR)/`basename $@` $@
  35. @rm -rf $(TMPDIR)
  36. clean:
  37. rm -f *.pdf */*.pdf