1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-11 00:52:44 +03:00
mal/livescript/Makefile

41 lines
1.3 KiB
Makefile
Raw Normal View History

2017-05-24 16:03:48 +03:00
SOURCES_BASE = reader.ls printer.ls env.ls core.ls utils.ls
SOURCES_STEPS = step0_repl.ls step1_read_print.ls step2_eval.ls \
step4_if_fn_do.ls step5_tco.ls step6_file.ls step7_quote.ls \
step8_macros.ls step9_try.ls stepA_mal.ls
SOURCES_LISP = env.ls core.ls stepA_mal.ls
2017-05-24 16:03:48 +03:00
SOURCES = $(SOURCES_BASE) $(SOURCES_STEPS)
2017-04-05 23:01:41 +03:00
2017-05-24 16:03:48 +03:00
BINS = $(SOURCES:%.ls=%.js)
2017-04-05 23:01:41 +03:00
LSC = node_modules/.bin/lsc
all: node_modules $(BINS)
2017-04-05 23:01:41 +03:00
node_modules:
npm install
%.js: %.ls node_modules
$(LSC) -d -c $(@:%.js=%.ls)
2017-04-05 23:01:41 +03:00
step1_read_print.js: utils.js reader.js printer.js
step2_eval.js: utils.js reader.js printer.js
step3_env.js: utils.js reader.js printer.js env.js
step4_if_fn_do.js: utils.js reader.js printer.js env.js core.js
step5_tco.js: utils.js reader.js printer.js env.js core.js
step6_file.js: utils.js reader.js printer.js env.js core.js
step7_quote.js: utils.js reader.js printer.js env.js core.js
step8_macros.js: utils.js reader.js printer.js env.js core.js
step9_try.js: utils.js reader.js printer.js env.js core.js
stepA_mal.js: utils.js reader.js printer.js env.js core.js
2017-04-05 23:01:41 +03:00
clean:
2017-05-24 16:03:48 +03:00
rm -f $(BINS)
stats: $(SOURCES)
@wc $^
@printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]"
stats-lisp: $(SOURCES_LISP)
@wc $^
@printf "%5s %5s %5s %s\n" `egrep "^\w*#|^\w*$$" $^ | wc` "[comments/blanks]"