markdown-template/Makefile.notes

20 lines
312 B
Makefile

PDFDIR = pdf
SRCDIR = src
PANDOC = pandoc
PFLAGS =
SRCS = $(shell find $(SRCDIR) -type f -iname '*.md')
PDFS = $(patsubst $(SRCDIR)/%.md,$(PDFDIR)/%.pdf,$(SRCS))
.PHONY: all
all: $(PDFS)
.PHONY: clean
clean:
$(RM) -r $(PDFDIR)
$(PDFDIR)/%.pdf: $(SRCDIR)/%.md
@mkdir -p $(@D)
$(PANDOC) $(PFLAGS) $< -o $@