20 lines
321 B
Makefile
20 lines
321 B
Makefile
|
PDFDIR = pdf
|
||
|
SRCDIR = src
|
||
|
|
||
|
PANDOC = pandoc
|
||
|
PANDOCFLAGS =
|
||
|
|
||
|
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 $@
|