-
Notifications
You must be signed in to change notification settings - Fork 584
/
Makefile
61 lines (47 loc) · 1.51 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
all:
gulp
test:
gulp test
clean:
gulp clean
TSC = node ../node_modules/typescript/bin/tsc
.PHONY: cli
built/%.d.ts: %/*.ts %/*/*.ts
@echo "[tsc] $@"
@cd $*; $(TSC)
built/%.md5: built/%.d.ts
@md5sum < $< > built/md5-tmp
@cmp -s built/md5-tmp $@ || cp built/md5-tmp $@
CLI_DEPS = \
pxtcompiler/ext-typescript/lib/typescript.js \
built/pxtlib.js \
built/pxtcompiler.js \
built/pxtpy.js \
built/pxtsim.js \
built/cli.js
WORKER_DEPS = \
pxtcompiler/ext-typescript/lib/typescript.js \
node_modules/fuse.js/dist/fuse.min.js \
node_modules/lzma/src/lzma_worker-min.js \
node_modules/dompurify/dist/purify.min.js \
built/pxtlib.js \
built/pxtcompiler.js \
built/pxtpy.js
JS_HEADER = '"use strict"; global.savedModuleExports = module.exports; module.exports = null;'
built/pxtpy.d.ts: built/pxtlib.md5 built/pxtcompiler.md5
built/pxteditor.d.ts: built/pxtlib.md5 built/pxtblocks.md5
built/pxtblocks.d.ts: built/pxtlib.md5
built/pxtrunner.d.ts: built/pxtlib.md5 built/pxtsim.md5 built/pxtcompiler.md5 built/pxteditor.md5 built/pxtblocks.md5
built/cli.d.ts: built/pxtlib.md5 built/pxtcompiler.md5 built/pxtpy.md5 built/pxtsim.md5
built/web/pxtworker.js: built/pxtpy.d.ts $(WORKER_DEPS) Makefile
@echo "[cat] $@"
@(echo '"use strict";'; cat $(WORKER_DEPS)) > $@
built/pxt.js: built/cli.d.ts $(CLI_DEPS) Makefile
@echo "[cat] $@"
@(echo $(JS_HEADER); cat $(CLI_DEPS)) > $@
cli:
@$(MAKE) -j8 built/pxt.js
@$(MAKE) built/pxt.js
worker:
@$(MAKE) -j8 built/web/pxtworker.js
@$(MAKE) built/web/pxtworker.js