-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (46 loc) · 1.56 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
# {{{1 Variables
# =========
VPATH = . assets
vpath %.bib _bibliography
vpath %.html . _includes _layouts _site
vpath %.scss _sass slides/reveal.js/css/theme/template
vpath %.yaml . _spec
PANDOC_VERSION := 2.14
JEKYLL_VERSION := 4.2.0
PANDOC/CROSSREF := docker run --rm -v "`pwd`:/data" \
-u "`id -u`:`id -g`" pandoc/crossref:$(PANDOC_VERSION)
JEKYLL := palazzo/jekyll-tufte:$(JEKYLL_VERSION)-$(PANDOC_VERSION)
ASSETS = $(wildcard assets/*)
AULA = $(wildcard _aula/*.md)
SLIDES = $(patsubst _aula/%.md,slides/%/index.html,$(AULA))
SASS = _revealjs-settings.scss \
mixins.scss settings.scss theme.scss
# {{{1 Recipes
# =======
.PHONY : _site
_site : $(SLIDES) assets/css/main.scss
@echo "####################"
@docker run --rm -v "`pwd`:/srv/jekyll" \
$(JEKYLL) /bin/bash -c "chmod 777 /srv/jekyll && jekyll build --future"
slides/%/index.html : _aula/%.md revealjs.yaml \
revealjs-crossref.yaml references.bib $(SASS) \
assets/css/revealjs-main.scss
@-mkdir -p $(@D)
@$(PANDOC/CROSSREF) -o $@ -d _spec/revealjs.yaml $<
@echo $(@D)
.PRECIOUS : assets/css/revealjs-main.scss assets/css/main.scss
assets/css/%.scss : _sass/%.scss
@-mkdir -p assets/css
@cp $< $@
@echo "$@ atualizado."
.PHONY : serve
serve : $(SLIDES) assets/css/main.scss
@echo "####################"
@docker run --rm -v "`pwd`:/srv/jekyll" \
-h "0.0.0.0:127.0.0.1" -p "4000:4000" \
$(JEKYLL) jekyll serve --future
.PHONY : clean
clean :
-@rm -rf *.aux *.bbl *.bcf *.blg *.fdb_latexmk *.fls *.log *.run.xml \
tau0005-*.tex
# vim: set foldmethod=marker shiftwidth=2 tabstop=2 :