This commit is contained in:
Francois Lesueur
2023-01-10 13:35:39 +01:00
parent db522a0e1e
commit 60dd6a2740
3 changed files with 27 additions and 2 deletions

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
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)
$(OUTDIR):
mkdir $(OUTDIR)
$(OUTDIR)/%.html: %.md $(OUTDIR)
pandoc --from=markdown+lists_without_preceding_blankline $< -o $@ -s
$(OUTDIR)/%.pdf: $(OUTDIR)/%.html
wkhtmltopdf $< $@
clean:
\rm -rf *.html *.pdf $(OUTDIR)