forked from sordina/compose_haskell_workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (52 loc) · 1.94 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
#
# Compose :: Melbourne 2016 Haskell Workshop
#
# * http://composeconference.github.io/compose_haskell_workshop/
# * https://github.com/composeconference/compose_haskell_workshop
#
WHITELIST := 'Makefile\|resources/'
CHAPTERS := resources/markdown/Title.md dependencies/TOC.md \
$(shell sed -n '/^[^ ;].*|/ s|^\([^ ]*\).*|resources/markdown/\1.md|p' \
resources/markdown/TOC.md)
all: dependencies html todo standalone
html:
@ grep -v '^;' resources/markdown/TOC.md | sed 's/.*|//' > dependencies/TOC.md
@ cat resources/html/head.html > index.html
@ resources/scripts/wrapchapters.sh pandoctor $(CHAPTERS) >> index.html
@ cat resources/html/footer.html >> index.html
.PHONY: standalone
standalone: compose_melbourne_2016_haskell_workshop_standalone.html
compose_melbourne_2016_haskell_workshop_standalone.html: html
inliner -m 'index.html' > compose_melbourne_2016_haskell_workshop_standalone.html
display: html
@ ./resources/scripts/chromereload index.html
devel:
open index.html
commando -p cat -q -j \
| grep --line-buffered -v 'dependencies/' \
| grep --line-buffered -v 'dot/' \
| grep --line-buffered -v 'git' \
| grep --line-buffered $(WHITELIST) \
| uniqhash \
| conscript make display
todo: unchecked_examples
@ grep -ni todo $(CHAPTERS) | cat
publish:
make
git add -A .
@ echo "Commit Message:"
@ read message; \
git commit -m "Publishing - $$message" || echo "No commit required"
git push || echo "No master push required"
git push origin master:gh-pages || echo "No gh-pages push required"
dependencies:
mkdir -p dependencies
clean:
rm -rf dependencies
mkdir dependencies
rm -f /tmp/haskell_workshop_md5_*
rm -f /tmp/haskell_workshop.*.cache
rm -f /tmp/ghc_results_*
rm -f /tmp/haskell_workshop_check.*
unchecked_examples:
@ grep -n 'data-language=haskell' $(CHAPTERS) | grep -v check | cat