-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
106 lines (75 loc) · 2.17 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
PANDOC=pandoc
ROOT=""
PANDOCARGS=-t revealjs -s -V theme=night --css=http://lab.hakim.se/reveal-js/css/theme/night.css \
--css=$(ROOT)/css/ucl_reveal.css --css=$(ROOT)/site-styles/reveal.css \
--default-image-extension=png --highlight-style=zenburn --mathjax -V revealjs-url=http://lab.hakim.se/reveal-js
MDS=$(filter-out _site, $(wildcard */*.md ))
TEMPLATED=$(MDS:.md=.tmd)
RELATIVE=$(MDS:.md=.rmd)
SLIDES=$(MDS:.md=-reveal.html)
EXES=$(shell find build -name *.x)
vpath %.x build
OUTS=$(subst build/,,$(EXES:.x=.out))
default: _site
.DELETE_ON_ERROR:
.SUFFIXES:
%.out: %.x Makefile
$< > $@
%-reveal.html: %.rmd Makefile
cat $^ | $(PANDOC) $(PANDOCARGS) -o $@
%.png: %.py Makefile
python $< $@
%.png: %.nto Makefile
neato $< -T png -o $@
%.png: %.dot Makefile
dot $< -T png -o $@
%.png: %.uml Makefile
java -Djava.awt.headless=true -jar plantuml.jar -p < $< > $@
notes.pdf: combined.md Makefile
$(PANDOC) --from markdown combined.md -o notes.pdf
%.tmd: %.md liquify.rb Makefile
ruby liquify.rb $< > $@
%.rmd: %.md liquify.rb Makefile
ruby liquify.rb $< rel > $@
combined.md: $(TEMPLATED)
cat $^ > $@
notes.tex: combined.md Makefile $(OUTS)
$(PANDOC) --from markdown combined.md -o notes.tex
master.zip: Makefile
rm -f master.zip
wget https://github.com/UCL-RITS/indigo-jekyll/archive/master.zip
ready: indigo $(OUTS) notes.pdf $(SLIDES)
indigo-jekyll-master: Makefile master.zip
rm -rf indigo-jekyll-master
unzip master.zip
touch indigo-jekyll-master
indigo: indigo-jekyll-master Makefile
cp -r indigo-jekyll-master/indigo/images .
cp -r indigo-jekyll-master/indigo/js .
cp -r indigo-jekyll-master/indigo/css .
cp -r indigo-jekyll-master/indigo/_includes .
cp -r indigo-jekyll-master/indigo/_layouts .
cp -r indigo-jekyll-master/indigo/favicon* .
touch indigo
.PHONY: ready
_site: ready _plugins/idio.rb
jekyll build --verbose
preview: ready
jekyll serve --verbose
clean:
rm -rf build
rm -rf indigo
rm -rf indigo-jekyll-master
rm -f master.zip
rm -f notes.pdf
rm -rf _site
rm -f favicon*
rm -f combined*
rm -rf _includes
rm -rf _layouts
rm -rf js
rm -rf images
rm -f */*.tmd
rm -f */*.rmd
rm -f */.slide.html
rm -f */*-reveal.html