20 lines
343 B
Makefile
20 lines
343 B
Makefile
PDFDIR = pdf
|
|
SRCDIR = src
|
|
|
|
PANDOC = pandoc
|
|
PANDOCFLAGS = -f markdown -t latex
|
|
|
|
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) $(PANDOCFLAGS) $< -o $@
|