-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (48 loc) · 1.28 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
js2c = ../js2coffee/node_modules/.bin/js2coffee
js2c = ../js2coffee-redux/bin/js2c
coffee = ./node_modules/.bin/coffee
browserify = ./node_modules/.bin/browserify
uglifyjs = ./node_modules/.bin/uglifyjs
test: \
browserify@test \
eventemitter2@test \
qs@test
# ----
browserify@test: \
browserify/build.1.js \
browserify/build.2.coffee \
browserify/build.out.js
# 4: testing...
@cd browserify && npm install && npm test
browserify/build.1.js: browserify/simple.js
%/build.1.js: %/simple.js
# 1: bundle... [$< > $@]
@$(browserify) -s mod $< | $(uglifyjs) -b > $@
# ----
eventemitter2@test: \
eventemitter2/build.1.js \
eventemitter2/build.2.coffee \
eventemitter2/build.out.js
# 4: testing...
@cd eventemitter2 && npm install && npm test
eventemitter2/build.1.js: eventemitter2/index.js
# 1: bundle... [$< > $@]
@$(browserify) -s eventemitter2 $< | $(uglifyjs) -b > $@
# ----
qs@test: \
qs/build.1.js \
qs/build.2.coffee \
qs/build.out.js
# 4: testing...
@cd qs && npm install && npm test
qs/build.1.js: qs/index.js
# 1: bundle... [$< > $@]
@$(browserify) -s qs $< | $(uglifyjs) -b > $@
# ----
%.out.js: %.2.coffee
# 3: coffee... [$< > $@]
@$(coffee) -p $< > $@
%.2.coffee: %.1.js
# 2: js2c... [$< > $@]
@$(js2c) $< > $@
.PHONY: dummy