2021-10-21 17:22:14 +02:00
|
|
|
OUTDIR= output
|
|
|
|
SRC= $(wildcard *.md)
|
|
|
|
PDF= $(addprefix $(OUTDIR)/,$(SRC:.md=.pdf))
|
|
|
|
HTML= $(addprefix $(OUTDIR)/,$(SRC:.md=.html))
|
|
|
|
|
|
|
|
|
|
|
|
all: $(PDF) $(HTML)
|
|
|
|
|
|
|
|
pdf: $(PDF)
|
|
|
|
|
|
|
|
html: $(HTML)
|
|
|
|
|
|
|
|
directories: $(OUTDIR)
|
|
|
|
|
2021-11-26 11:15:50 +01:00
|
|
|
$(OUTDIR):
|
2021-10-21 17:22:14 +02:00
|
|
|
mkdir $(OUTDIR)
|
|
|
|
|
|
|
|
$(OUTDIR)/%.html: %.md $(OUTDIR)
|
2021-11-26 11:15:50 +01:00
|
|
|
pandoc --from=markdown+lists_without_preceding_blankline $< -o $@ -s
|
2021-10-21 17:22:14 +02:00
|
|
|
|
|
|
|
$(OUTDIR)/%.pdf: $(OUTDIR)/%.html
|
|
|
|
wkhtmltopdf $< $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
\rm -rf *.html *.pdf $(OUTDIR)
|