forked from wisp-lang/wisp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (53 loc) · 1.42 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
BROWSERIFY = node ./node_modules/browserify/bin/cmd.js
WIPS_CURRENT = node ./bin/wisp.js
FLAGS =
ifdef verbose
FLAGS = --verbose
endif
ifdef current
WISP = $(WIPS_CURRENT)
else
WISP = ./node_modules/wisp/bin/wisp.js
endif
core: runtime sequence string ast reader compiler writer
node: core wisp node-engine repl
browser: core browser-engine
all: node browser
test: test1
test1:
$(WIPS_CURRENT) ./test/test.wisp $(FLAGS)
clean:
rm -rf engine
rm -rf backend
touch null.js
rm *.js
repl:
cat ./src/repl.wisp | $(WISP) > ./repl.js
reader:
cat ./src/reader.wisp | $(WISP) > ./reader.js
compiler:
cat ./src/compiler.wisp | $(WISP) > ./compiler.js
writer:
mkdir -p ./backend/javascript/
cat ./src/backend/javascript/writer.wisp | $(WISP) > ./backend/javascript/writer.js
runtime:
cat ./src/runtime.wisp | $(WISP) > ./runtime.js
sequence:
cat ./src/sequence.wisp | $(WISP) > ./sequence.js
string:
cat ./src/string.wisp | $(WISP) > ./string.js
ast:
cat ./src/ast.wisp | $(WISP) > ./ast.js
wisp:
cat ./src/wisp.wisp | $(WISP) > ./wisp.js
node-engine:
mkdir -p ./engine/
cat ./src/engine/node.wisp | $(WISP) > ./engine/node.js
browser-engine:
mkdir -p ./engine/
cat ./src/engine/browser.wisp | $(WISP) > ./engine/browser.js
browser-embed: core browser-engine bundle-browser-engine
bundle-browser-engine:
$(BROWSERIFY) --debug \
--exports require \
--entry ./engine/browser.js > ./browser-embed.js