]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | NODE:=$(shell which nodejs node | head -1) |
11fdf7f2 | 2 | DUKLUV:=dukluv |
7c673cae FG |
3 | |
4 | # Try to get a useful default --source-dirs which works both in the Duktape | |
5 | # repo and in the distributable. We don't want to add '..' because it would | |
6 | # scan a lot of undesired files in the Duktape repo (e.g. test262 testcases). | |
7 | ifeq ($(wildcard ../tests/ecmascript/*.js),) | |
8 | SOURCEDIRS:=../ | |
9 | else | |
10 | SOURCEDIRS:=../tests/ecmascript | |
11 | endif | |
12 | ||
13 | .PHONY: all | |
14 | all: run | |
15 | ||
16 | .PHONY: run | |
17 | run: node_modules static/socket.io-1.2.0.js static/jquery-1.11.1.min.js static/reset.css static/jquery-ui.min.js static/jquery-ui.min.css static/images | |
11fdf7f2 TL |
18 | "$(NODE)" duk_debug.js --source-dirs=$(SOURCEDIRS) |
19 | ||
20 | rundebug: node_modules static/socket.io-1.2.0.js static/jquery-1.11.1.min.js static/reset.css static/jquery-ui.min.js static/jquery-ui.min.css static/images | |
21 | "$(NODE)" duk_debug.js --source-dirs=$(SOURCEDIRS) --verbose --log-messages /tmp/dukdebug-messages --dump-debug-pretty /tmp/dukdebug-pretty | |
22 | ||
23 | .PHONY: runproxynodejs | |
24 | runproxynodejs: node_modules static/socket.io-1.2.0.js static/jquery-1.11.1.min.js static/reset.css static/jquery-ui.min.js static/jquery-ui.min.css static/images | |
25 | @echo "Running Node.js based debug proxy" | |
26 | "$(NODE)" duk_debug.js --json-proxy | |
27 | ||
28 | .PHONY: runproxydukluv | |
29 | runproxydukluv: duk_debug_meta.json | |
30 | @echo "Running Dukluv based debug proxy (you may need to edit DUKLUV in the Makefile)" | |
31 | "$(DUKLUV)" duk_debug_proxy.js --log-level 2 --metadata duk_debug_meta.json --readable-numbers | |
7c673cae FG |
32 | |
33 | .PHONY: runproxy | |
11fdf7f2 | 34 | runproxy: runproxydukluv |
7c673cae FG |
35 | |
36 | .PHONY: clean | |
37 | clean: | |
38 | @rm -f static/socket.io-1.2.0.js | |
39 | @rm -f static/jquery-1.11.1.min.js | |
40 | @rm -f static/jquery.syntaxhighlighter.min.js | |
41 | @rm -f static/jquery.snippet.min.js | |
42 | @rm -f static/jquery.snippet.min.css | |
43 | @rm -f static/prefixfree.min.js | |
44 | @rm -f static/reset.css | |
45 | @rm -f static/jquery-ui.min.js | |
46 | @rm -f static/jquery-ui.min.css | |
47 | @rm -rf static/images | |
48 | @rm -f jquery-ui-1.11.2.zip | |
49 | @rm -rf jquery-ui-1.11.2 | |
50 | @rm -rf node_modules | |
11fdf7f2 | 51 | @rm -f duk_debug_meta.json |
7c673cae FG |
52 | |
53 | node_modules: | |
54 | npm install | |
55 | ||
11fdf7f2 TL |
56 | duk_debug_meta.json: |
57 | python merge_debug_meta.py --output $@ \ | |
58 | --class-names duk_classnames.yaml \ | |
59 | --opcodes duk_opcodes.yaml \ | |
60 | --debug-commands duk_debugcommands.yaml \ | |
61 | --debug-errors duk_debugerrors.yaml | |
62 | ||
7c673cae | 63 | static/socket.io-1.2.0.js: |
11fdf7f2 | 64 | wget -O $@ http://cdn.socket.io/socket.io-1.2.0.js |
7c673cae FG |
65 | |
66 | static/jquery-1.11.1.min.js: | |
67 | wget -O $@ http://code.jquery.com/jquery-1.11.1.min.js | |
68 | ||
69 | # http://balupton.github.io/jquery-syntaxhighlighter/demo/ | |
70 | static/jquery.syntaxhighlighter.min.js: | |
71 | wget -O $@ http://balupton.github.com/jquery-syntaxhighlighter/scripts/jquery.syntaxhighlighter.min.js | |
72 | ||
73 | # http://steamdev.com/snippet/ | |
74 | static/jquery.snippet.min.js: | |
75 | wget -O $@ http://steamdev.com/snippet/js/jquery.snippet.min.js | |
76 | static/jquery.snippet.min.css: | |
77 | wget -O $@ http://steamdev.com/snippet/css/jquery.snippet.min.css | |
78 | ||
79 | # http://prismjs.com/ | |
80 | # http://prismjs.com/plugins/line-highlight/ | |
81 | # | |
82 | # XXX: prism download manually? | |
83 | ||
84 | # https://raw.github.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js | |
85 | static/prefixfree.min.js: | |
86 | wget -O $@ https://raw.github.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js | |
87 | ||
88 | # http://meyerweb.com/eric/tools/css/reset/ | |
89 | static/reset.css: | |
90 | wget -O $@ http://meyerweb.com/eric/tools/css/reset/reset.css | |
91 | ||
92 | jquery-ui-1.11.2.zip: | |
93 | wget -O $@ http://jqueryui.com/resources/download/jquery-ui-1.11.2.zip | |
94 | jquery-ui-1.11.2: jquery-ui-1.11.2.zip | |
95 | unzip $< | |
96 | static/jquery-ui.min.js: jquery-ui-1.11.2 | |
97 | cp jquery-ui-1.11.2/jquery-ui.min.js $@ | |
98 | static/jquery-ui.min.css: jquery-ui-1.11.2 | |
99 | cp jquery-ui-1.11.2/jquery-ui.min.css $@ | |
100 | static/images: jquery-ui-1.11.2 | |
101 | cp -r jquery-ui-1.11.2/images static/ |