diff options
Diffstat (limited to 'js/Makefile')
| -rw-r--r-- | js/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/Makefile b/js/Makefile new file mode 100644 index 0000000..cb57644 --- /dev/null +++ b/js/Makefile @@ -0,0 +1,29 @@ + +TESTS = tests/types.js tests/reader.js tests/step5_tco.js + +SOURCES = node_readline.js types.js reader.js stepA_more.js +WEB_SOURCES = $(SOURCES:node_readline.js=josh_readline.js) + +all: mal.js mal_web.js + +mal.js: $(SOURCES) + echo "#!/usr/bin/env node" > $@ + cat $+ | grep -v "= *require('./" >> $@ + chmod +x $@ + +mal_web.js: $(WEB_SOURCES) + cat $+ | grep -v "= *require('./" > $@ + +clean: + rm -f mal.js mal_web.js + +.PHONY: stats tests $(TESTS) + +stats: $(SOURCES) + @wc $^ + +tests: $(TESTS) + +$(TESTS): + @echo "Running $@"; \ + node $@ || exit 1; \ |
