2014-11-09 01:56:36 +03:00
|
|
|
TESTS =
|
|
|
|
|
|
|
|
SOURCES_BASE = node_readline.coffee types.coffee \
|
|
|
|
reader.coffee printer.coffee
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = env.coffee core.coffee stepA_mal.coffee
|
2014-11-09 01:56:36 +03:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
|
|
|
|
2016-02-15 05:57:31 +03:00
|
|
|
all: node_modules dist
|
2015-10-08 07:32:45 +03:00
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm install
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
dist: mal.coffee mal
|
2016-02-15 05:57:31 +03:00
|
|
|
|
|
|
|
mal.coffee: $(SOURCES)
|
2016-02-24 09:45:40 +03:00
|
|
|
cat $+ | grep -v "= *require('./" > $@
|
|
|
|
|
|
|
|
mal: mal.coffee
|
2016-02-15 05:57:31 +03:00
|
|
|
echo "#!/usr/bin/env coffee" > $@
|
2016-02-24 09:45:40 +03:00
|
|
|
cat $< >> $@
|
2016-02-15 05:57:31 +03:00
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
clean:
|
2016-02-24 09:45:40 +03:00
|
|
|
rm -f mal.coffee mal
|
2016-02-15 05:57:31 +03:00
|
|
|
|
2014-11-09 01:56:36 +03:00
|
|
|
|
|
|
|
.PHONY: stats tests $(TESTS)
|
|
|
|
|
|
|
|
stats: $(SOURCES)
|
|
|
|
@wc $^
|
2015-10-27 06:33:49 +03:00
|
|
|
@printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]"
|
2014-11-09 01:56:36 +03:00
|
|
|
stats-lisp: $(SOURCES_LISP)
|
|
|
|
@wc $^
|
2015-10-27 06:33:49 +03:00
|
|
|
@printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]"
|