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