Makefile 986 B

12345678910111213141516171819202122232425262728293031323334
  1. CORE_PLAYBOOKS := bard.pdf cleric.pdf druid.pdf fighter.pdf paladin.pdf ranger.pdf thief.pdf wizard.pdf
  2. INVERSE_PLAYBOOKS := collector.pdf lanternbearer.pdf survivor.pdf
  3. EXTENDED_PLAYBOOKS := priest.pdf artificer.pdf witch.pdf mage.pdf
  4. CUSTOM_PLAYBOOKS := farmer.pdf merchant.pdf
  5. chalcedony.pdf: travelrules.pdf core-playbooks.pdf inverse-playbooks.pdf extended-playbooks.pdf
  6. @echo "[CONCAT] $@"
  7. @pdfunite $^ $@
  8. core-playbooks.pdf: $(CORE_PLAYBOOKS)
  9. @echo "[CONCAT] $@"
  10. @pdfunite $^ $@
  11. inverse-playbooks.pdf: $(INVERSE_PLAYBOOKS)
  12. @echo "[CONCAT] $@"
  13. @pdfunite $^ $@
  14. extended-playbooks.pdf: $(EXTENDED_PLAYBOOKS)
  15. @echo "[CONCAT] $@"
  16. @pdfunite $^ $@
  17. custom-playbooks.pdf: $(CUSTOM_PLAYBOOKS)
  18. @echo "[CONCAT] $@"
  19. @pdfunite $^ $@
  20. %.pdf: %.tex assets/prelude.tex
  21. $(eval TMPDIR := $(shell mktemp -d))
  22. @echo "[PDF] $@"
  23. @xelatex -halt-on-error -interaction=batchmode -output-directory=$(TMPDIR) $< 2>&1 >/dev/null
  24. @mv $(TMPDIR)/$@ $@
  25. @rm -rf $(TMPDIR)
  26. clean:
  27. rm -f *.pdf