-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
87 lines (68 loc) · 1.82 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
JSMIN=node_modules/.bin/uglifyjs -c -m
BROWSERIFY=node_modules/.bin/browserify -t icsify
JQUERY_VERSION=1.9.0
default: html js
html: \
build/html/index.html \
build/html/index-big.html \
build/html/pp.html \
build/html/pp-big.html \
build/html/robots.txt
js: extension/build/js/main.js
all: default
setup:
npm install -d
clean:
rm -rf build
test:
for f in test/*.js; do echo "test $$f..."; node $$f; done
for f in test/*.iced; do echo "test $$f..."; iced $$f; done
build/js-min/%.js: build/js/%.js
mkdir -p `dirname $@`
$(JSMIN) < $^ > $@
build/js/jquery.js: includes/jquery-$(JQUERY_VERSION).js
mkdir -p `dirname $@`
cat < $< > $@
build/js/dict.js: data/dict.js
mkdir -p `dirname $@`
cat < $< > $@
build/js/main.js: src/main.iced
mkdir -p `dirname $@`
($(BROWSERIFY) $< > $@~) && mv $@~ $@
build/js/pp.js: src/pp.iced
mkdir -p `dirname $@`
($(BROWSERIFY) $< > $@~) && mv $@~ $@
extension/build/js/main.js: build/js/main.js
mkdir -p `dirname $@`
cat $< > $@
build/html/index.html: html/index.html \
build/js-min/jquery.js \
build/js-min/main.js \
css/main.css
mkdir -p `dirname $@`
(python bin/inline.py -m < $< > $@~) && mv $@~ $@
build/html/index-big.html: html/index.html \
build/js/jquery.js \
build/js/main.js \
css/main.css
mkdir -p `dirname $@`
(python bin/inline.py < $< > $@~) && mv $@~ $@
build/html/pp-big.html: html/pp.html \
build/js/jquery.js \
build/js/dict.js \
build/js/pp.js \
css/pp.css
mkdir -p `dirname $@`
(python bin/inline.py < $< > $@~) && mv $@~ $@
build/html/pp.html: html/pp.html \
build/js-min/jquery.js \
build/js-min/dict.js \
build/js-min/pp.js \
css/pp.css
mkdir -p `dirname $@`
(python bin/inline.py < $< > $@~) && mv $@~ $@
build/html/robots.txt:
echo "User-agent: *" > $@
%.md: %.md.in
python bin/footnoter.py < $< > $@
.PHONY: clean depclean test setup