Makefile 1.1 KB

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 golem.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 "\033[0;95m[PDFUNITE]\033[0m $@"
  7. @pdfunite $^ $@
  8. core-playbooks.pdf: $(CORE_PLAYBOOKS)
  9. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  10. @pdfunite $^ $@
  11. inverse-playbooks.pdf: $(INVERSE_PLAYBOOKS)
  12. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  13. @pdfunite $^ $@
  14. extended-playbooks.pdf: $(EXTENDED_PLAYBOOKS)
  15. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  16. @pdfunite $^ $@
  17. custom-playbooks.pdf: $(CUSTOM_PLAYBOOKS)
  18. @echo "\033[0;95m[PDFUNITE]\033[0m $@"
  19. @pdfunite $^ $@
  20. %.pdf: %.tex assets/prelude.tex
  21. $(eval TMPDIR := $(shell mktemp -d))
  22. @echo "\033[0;94m[XELATEX]\033[0m $@"
  23. @xelatex -interaction=nonstopmode -output-directory=$(TMPDIR) $< >$(TMPDIR)/log.txt 2>&1 || ( cat $(TMPDIR)/log.txt >&2; exit 1 )
  24. @mv $(TMPDIR)/$@ $@
  25. @rm -rf $(TMPDIR)
  26. clean:
  27. rm -f *.pdf