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