forked from ucsd-cse130/web
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
executable file
·44 lines (32 loc) · 1.27 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
#############################################################################
PANDOC=pandoc --columns=80 -s --mathjax=http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML --slide-level=2
SLIDY=$(PANDOC) -t slidy
DZSLIDES=$(PANDOC) --highlight-style tango --css=slides.css -w dzslides
HANDOUT=$(PANDOC) --highlight-style tango --css=text.css -w html5
SLIDES=$(patsubst lectures/%.md,lectures/%.md.slides.html,$(wildcard *.md))
# clear out all suffixes
.SUFFIXES:
# list only those we use
.SUFFIXES: .html .md
.PHONY: all slides handouts
#############################################################################
site:
stack build
stack exec -- homepage rebuild
upload:
cp -r _site/* docs/
cd docs/ && git add . && git commit -a -m "update page" && git push origin master
clean:
rm -rf *.hi *.o .*.swp .*.swo website _site/ _cache/
server:
stack exec -- homepage watch
#############################################################################
handouts:
for file in *.md; do $(HANDOUT) $$file -o $$file.handout.html; done
# for file in *.md; do $(DZSLIDES) $$file -o $$file.slides.html; done
# for file in *.md; do $(PANDOC) $$file -o $$file.pdf; done
slides: $(SLIDES)
%.md.slides.html: %.md
$(DZSLIDES) $< -o $@
# clean:
# rm -f *.pdf *.html *.class