Skip to content

Commit ce2dc5d

Browse files
committed
Makefile for new slidefactory
1 parent a8e031a commit ce2dc5d

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

docs/Makefile

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
SOURCES=$(wildcard *.md)
2-
TARGETS=$(patsubst %.md,%.html,$(SOURCES))
3-
PDFS=$(patsubst %.md,%.pdf,$(SOURCES))
1+
FACTORY=slidefactory.sif
2+
OPTIONS=
43

5-
SINGULARITY=singularity
6-
SARGS=run
7-
SIMAGE=../../slide-template/slidefactory.simg
8-
OPTIONS=--theme=csc-2016-prace
4+
SRC=$(wildcard *.md)
5+
HTML=$(patsubst %.md,%.html,$(SRC))
6+
PDF=$(patsubst %.md,%.pdf,$(SRC))
97

10-
all: $(TARGETS)
8+
.PHONY: html pdf clean
119

12-
pdf: $(PDFS)
10+
html: $(HTML)
1311

14-
%.html: %.md
15-
$(SINGULARITY) $(SARGS) $(SIMAGE) $(OPTIONS) $<
16-
17-
%.pdf: %.html
18-
chromium-browser --headless --print-to-pdf=$@ file://`pwd`/$(<)?print-pdf
12+
pdf: $(PDF)
1913

20-
.PHONY: clean
2114
clean:
22-
-/bin/rm -f *.html *.pdf *~
15+
-rm -f $(HTML) $(PDF)
16+
17+
%.html: %.md
18+
$(FACTORY) $(OPTIONS) $<
19+
20+
%.pdf: %.md
21+
$(FACTORY) $(OPTIONS) --pdf $<

0 commit comments

Comments
 (0)