QUARTO ?= quarto .PHONY: all pdf docx clean # Build both formats for both documents all: pdf docx # Aggregate targets pdf: index.pdf Supplements.pdf docx: index.docx Supplements.docx # Pattern rules for either format %.pdf: %.qmd OUTPUT_FORMAT=pdf/tex $(QUARTO) render $< --to pdf %.docx: %.qmd OUTPUT_FORMAT=docx $(QUARTO) render $< --to docx clean: rm -f index.pdf Supplements.pdf index.docx Supplements.docx