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
|
2017-05-24 20:12:00 +03:00
|
|
|
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
|
|
|
|
2017-05-24 16:10:53 +03:00
|
|
|
LSC = node_modules/.bin/lsc
|
|
|
|
|
|
|
|
all: node_modules $(BINS)
|
2017-04-05 23:01:41 +03:00
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm install
|
|
|
|
|
2017-05-24 20:12:00 +03:00
|
|
|
%.js: %.ls node_modules
|
2017-05-24 16:10:53 +03:00
|
|
|
$(LSC) -d -c $(@:%.js=%.ls)
|
2017-04-05 23:01:41 +03:00
|
|
|
|
2017-05-24 20:12:00 +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)
|
2017-05-24 20:12:00 +03:00
|
|
|
|
|
|
|
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]"
|