-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (40 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
### INPUT & OUTPUT ##########################################################
MD := $(wildcard *.md)
HTML := $(patsubst %.md, %.html, $(MD))
### TEMPLATE CONFIG #########################################################
OS := $(shell uname -s)
REVEAL := ./revealSlides
MACROS := $(REVEAL)/slide-build/macros.m4
TEMPLATE := $(REVEAL)/slide-build/template.html
FILTER := $(REVEAL)/slide-build/pandoc-filter/$(OS)
### EXPLICIT RULES ##########################################################
.PHONY: html setup server clean allclean
html: Makefile $(HTML)
setup: Makefile package.json gruntfile.js
@npm install
Makefile: $(REVEAL)/slide-build/Makefile
@\cp $(REVEAL)/slide-build/Makefile .
package.json: $(REVEAL)/slide-build/package.json
@\cp $(REVEAL)/slide-build/package.json .
gruntfile.js: $(REVEAL)/slide-build/gruntfile.js
@\cp $(REVEAL)/slide-build/gruntfile.js .
server: setup html
@npm start
$(HTML): $(SRC) $(TEMPLATE) $(MACROS)
clean:
rm -f $(HTML)
allclean:
rm -rf $(HTML) package.json gruntfile.js node_modules
### IMPLICIT RULES ##########################################################
%.html: %.md
m4 $(MACROS) $< | \
pandoc \
--from markdown+emoji+smart \
--to revealjs \
--no-highlight \
--mathjax \
--filter $(FILTER)/cols \
--filter $(FILTER)/media \
--template $(TEMPLATE) \
--variable template=$(REVEAL) \
-o $@