diff --git a/Makefile b/Makefile index 85b2464b0bc2b1ebeacba57e53cb9d4c1a717f5c..95ebd1936d1ff18d59987ef480b3dc843f671d6b 100644 --- a/Makefile +++ b/Makefile @@ -15,60 +15,17 @@ REVEALOPTIONS += --self-contained REVEALOPTIONS += -V revealjs-url=./reveal.js REVEALOPTIONS += -V theme=white -all: base_6.pdf base_5.pdf base_4.pdf base_3.pdf base_2.pdf base_1.pdf intro.pdf command_line.pdf index.html +MD=$(wildcard *.md) +HTML=$(MD:%.md=%.html) +PDF=$(MD:%.md=%.pdf) -all_html: intro.html base_1.html base_2.html base_3.html base_4.html base_5.html base_6.html command_line.html +all: $(HTML) $(PDF) -intro.pdf: intro.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ +%.pdf: %.md metadata.yaml + pandoc -s $(OPTIONS) $(PDFOPTIONS) -o $@ $< -intro.html: intro.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_1.pdf: base_1.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_1.html: base_1.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_2.pdf: base_2.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_2.html: base_2.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_3.pdf: base_3.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_3.html: base_3.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_4.pdf: base_4.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_4.html: base_4.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_5.pdf: base_5.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_5.html: base_5.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -base_6.pdf: base_6.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -base_6.html: base_6.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -command_line.pdf: command_line.md metadata.yaml - pandoc $(PDFOPTIONS) -o $@ $^ - -command_line.html: command_line.md metadata.yaml - pandoc $(REVEALOPTIONS) -o $@ $^ - -index.html: index.md - pandoc -s $(OPTIONS) $(HTMLOPTIONS) -o $@ $< +%.html: %.md metadata.yaml + pandoc -s $(OPTIONS) $(REVEALOPTIONS) -o $@ $< deploy: all all_html mkdir -p prog_seq_c_cours