-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 1.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
# Markdown files
SRC_MD = $(wildcard *.md)
DST_HTML = $(patsubst %.md,%.html,$(SRC_MD))
# All outputs.
DST_ALL = $(DST_HTML)
# Pandoc filters.
FILTERS = $(wildcard tools/filters/*.py)
# Inclusions.
INCLUDES = \
-Vheader="$$(cat _includes/header.html)" \
-Vfooter="$$(cat _includes/footer.html)" \
-Vjavascript="$$(cat _includes/javascript.html)"
# Default action is to show what commands are available.
all : commands
## commands : Display available commands.
commands : Makefile
@sed -n 's/^##//p' $<
## clean : Clean up temporary and intermediate files.
clean :
@rm -rf $$(find . -name '*~' -print)
## preview : Build website locally for checking.
preview : $(DST_ALL)
## rsync : rsync built site and assets to web server
rsync :
rsync -av \
README.rst \
css \
fig \
*.html \
intro-slides.pdf \
douglatornell.ca:webapps/djl_static/training/meopeers-2015-06-15/
## settings : Show variables and settings.
settings :
@echo 'SRC_MD:' $(SRC_MD)
@echo 'DST_HTML:' $(DST_HTML)
# Pattern to build a generic page.
%.html : %.md _layouts/page.html $(FILTERS)
pandoc -s -t html \
--template=_layouts/page \
--filter=tools/filters/blockquote2div.py \
$(INCLUDES) \
-o $@ $<