2014-03-25 01:32:24 +04:00
|
|
|
|
2014-04-28 02:58:48 +04:00
|
|
|
TESTS = tests/types.js tests/reader.js
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES_BASE = node_readline.js types.js reader.js printer.js
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = env.js core.js stepA_mal.js
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2014-04-26 23:19:49 +04:00
|
|
|
WEB_SOURCES = $(SOURCES:node_readline.js=jq_readline.js)
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2014-04-26 23:19:49 +04:00
|
|
|
all: node_modules mal.js web/mal.js
|
2014-04-22 20:44:26 +04:00
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm install
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
mal.js: $(SOURCES)
|
|
|
|
echo "#!/usr/bin/env node" > $@
|
|
|
|
cat $+ | grep -v "= *require('./" >> $@
|
|
|
|
chmod +x $@
|
|
|
|
|
2014-04-26 23:19:49 +04:00
|
|
|
web/mal.js: $(WEB_SOURCES)
|
2014-03-25 01:32:24 +04:00
|
|
|
cat $+ | grep -v "= *require('./" > $@
|
|
|
|
|
|
|
|
clean:
|
2014-04-26 23:19:49 +04:00
|
|
|
rm -f mal.js web/mal.js
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
.PHONY: stats tests $(TESTS)
|
|
|
|
|
|
|
|
stats: $(SOURCES)
|
|
|
|
@wc $^
|
2014-04-11 04:27:42 +04:00
|
|
|
stats-lisp: $(SOURCES_LISP)
|
|
|
|
@wc $^
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
tests: $(TESTS)
|
|
|
|
|
|
|
|
$(TESTS):
|
|
|
|
@echo "Running $@"; \
|
|
|
|
node $@ || exit 1; \
|