PANDOC     = pandoc
PDF_ENGINE = weasyprint
TEMPLATE   = template.html
CSS        = style.css
PARTNERS   = $(patsubst %.md,%.pdf,$(wildcard partners/*.md))

.PHONY: all clean

all: template.pdf $(PARTNERS)

# style.css is linked directly from template.html (not passed via --css),
# but listed here so editing it triggers a rebuild of every PDF.
%.pdf: %.md $(TEMPLATE) $(CSS)
	$(PANDOC) $< -o $@ --template=$(TEMPLATE) --pdf-engine=$(PDF_ENGINE) --standalone

clean:
	rm -f template.pdf partners/*.pdf
