-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
60 lines (43 loc) · 2.06 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
name=roguelike-browser-boilerplate
all: $(name).zip $(name)-private-coaching.pdf $(name).pdf # $(name)-license.pdf
$(name).zip: index.html main.js style.css icon.png colored_tilemap_packed.png 01coin.gif bg.png LICENSE.txt
mkdir -p $(name)
cp $? $(name)
zip -r $@ $(foreach f, $?, "$(name)/$(f)")
rm -rf $(name)
#$(name)-documents.zip: $(name).pdf $(name)-license-indie-professional.pdf
# mkdir -p $(name)-documents
# cp $? $(name)-documents
# zip -r $@ $(foreach f, $?, "$(name)-documents/$(f)")
# rm -rf $(name)-documents
$(name)-private-coaching.pdf: private-coaching.md print.css Makefile
pandoc -f markdown --highlight-style=tango --css print.css $< -o "$(@:.pdf=.html)"
chromium-browser --headless --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf-no-header --print-to-pdf="$@" "$(@:.pdf=.html)" --virtual-time-budget=10000
rm -f "$(@:.pdf=.html)"
$(name).pdf: Documentation.md print.css Makefile
pandoc -f markdown --highlight-style=tango --css print.css $< -o "$(@:.pdf=.html)"
chromium-browser --headless --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf-no-header --print-to-pdf="$@" "$(@:.pdf=.html)" --virtual-time-budget=10000
rm -f "$(@:.pdf=.html)"
#$(name)-license-student-hobbyist.pdf: license-common.md license-student-hobbyist.md
# cat $? | pandoc -f markdown -t latex --highlight-style=tango --css print.css -o $@
#$(name)-license.pdf: license-common.md license-indie-professional.md
# cat $? | pandoc -f markdown -t latex --highlight-style=tango --css print.css -o $@
### gh-pages build ###
docs: docs/index.html docs/icon.png docs/colored_tilemap_packed.png docs/bg.png
docs/%.png: %.png
mkdir -p docs
cp $< $@
docs/index.html: index.html style.css main.js compile.js
mkdir -p docs
node compile.js > $@
.PHONY: watch serve browserstack clean
watcher:
while true; do $(MAKE) -q || $(MAKE); sleep 0.5; done
serve: node_modules
npx live-server --no-browser --host=0.0.0.0 --port=8000
watch:
make -j 2 serve watcher
browserstack:
BrowserStackLocal --key 9pLHVRg5npQmv96R5QEx
clean:
rm -rf roguelike-browser-boilerplate*