forth: Add . interop special operator and tests
[jackhill/mal.git] / js / Makefile
CommitLineData
31690700 1
cc021efe 2TESTS = tests/types.js tests/reader.js
31690700 3
712af9ef 4SOURCES_BASE = node_readline.js types.js reader.js printer.js
01c97316 5SOURCES_LISP = env.js core.js stepA_interop.js
712af9ef 6SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
e4393504 7WEB_SOURCES = $(SOURCES:node_readline.js=jq_readline.js)
31690700 8
e4393504 9all: node_modules mal.js web/mal.js
e47ddca2
WB
10
11node_modules:
12 npm install
31690700
JM
13
14mal.js: $(SOURCES)
15 echo "#!/usr/bin/env node" > $@
16 cat $+ | grep -v "= *require('./" >> $@
17 chmod +x $@
18
e4393504 19web/mal.js: $(WEB_SOURCES)
31690700
JM
20 cat $+ | grep -v "= *require('./" > $@
21
22clean:
e4393504 23 rm -f mal.js web/mal.js
31690700
JM
24
25.PHONY: stats tests $(TESTS)
26
27stats: $(SOURCES)
28 @wc $^
712af9ef
JM
29stats-lisp: $(SOURCES_LISP)
30 @wc $^
31690700
JM
31
32tests: $(TESTS)
33
34$(TESTS):
35 @echo "Running $@"; \
36 node $@ || exit 1; \