Commit | Line | Data |
---|---|---|
891c3f3b JM |
1 | TESTS = |
2 | ||
3 | SOURCES_BASE = node_readline.coffee types.coffee \ | |
4 | reader.coffee printer.coffee | |
90f618cb | 5 | SOURCES_LISP = env.coffee core.coffee stepA_mal.coffee |
891c3f3b JM |
6 | SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) |
7 | ||
b6dc3e37 | 8 | all: node_modules dist |
44571c10 JM |
9 | |
10 | node_modules: | |
11 | npm install | |
12 | ||
8e2d4a4c | 13 | dist: mal.coffee mal |
b6dc3e37 JM |
14 | |
15 | mal.coffee: $(SOURCES) | |
8e2d4a4c JM |
16 | cat $+ | grep -v "= *require('./" > $@ |
17 | ||
18 | mal: mal.coffee | |
b6dc3e37 | 19 | echo "#!/usr/bin/env coffee" > $@ |
8e2d4a4c | 20 | cat $< >> $@ |
b6dc3e37 JM |
21 | chmod +x $@ |
22 | ||
23 | clean: | |
8e2d4a4c | 24 | rm -f mal.coffee mal |
b6dc3e37 | 25 | |
891c3f3b JM |
26 | |
27 | .PHONY: stats tests $(TESTS) | |
28 | ||
29 | stats: $(SOURCES) | |
30 | @wc $^ | |
f15b4021 | 31 | @printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]" |
891c3f3b JM |
32 | stats-lisp: $(SOURCES_LISP) |
33 | @wc $^ | |
f15b4021 | 34 | @printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]" |