2017-06-08 20:19:27 +03:00
|
|
|
SOURCES_BASE = Reader.elm Printer.elm Utils.elm Types.elm Env.elm \
|
|
|
|
Core.elm Eval.elm IO.elm
|
2017-06-18 23:21:25 +03:00
|
|
|
SOURCES_STEPS = step0_repl.elm step4_if_fn_do.elm step5_tco.elm step6_file.elm step1_read_print.elm step7_quote.elm
|
|
|
|
#step2_eval.elm step3_env.elm \
|
|
|
|
step8_macros.ls step9_try.ls stepA_mal.ls
|
2017-06-04 12:54:24 +03:00
|
|
|
SOURCES_LISP = #env.ls core.ls stepA_mal.ls
|
2017-06-08 20:19:27 +03:00
|
|
|
SOURCES = $(SOURCES_STEPS)
|
2017-06-04 12:54:24 +03:00
|
|
|
|
|
|
|
BINS = $(SOURCES:%.elm=%.js)
|
|
|
|
|
2017-06-05 00:41:21 +03:00
|
|
|
ELM = node_modules/.bin/elm
|
2017-06-04 12:54:24 +03:00
|
|
|
|
|
|
|
all: node_modules $(BINS)
|
|
|
|
|
|
|
|
node_modules:
|
|
|
|
npm install
|
|
|
|
|
2017-06-05 00:41:21 +03:00
|
|
|
elm_packages:
|
|
|
|
$(ELM) package install
|
|
|
|
|
2017-06-04 12:54:24 +03:00
|
|
|
%.js: %.elm node_modules
|
2017-06-05 00:41:21 +03:00
|
|
|
$(ELM) make $(@:%.js=%.elm) --output $@
|
2017-06-04 12:54:24 +03:00
|
|
|
|
2017-06-05 00:41:21 +03:00
|
|
|
step1_read_print.js: Reader.elm Printer.elm Utils.elm Types.elm
|
2017-06-08 20:19:27 +03:00
|
|
|
#step2_eval.js: Reader.elm Printer.elm Utils.elm Types.elm
|
|
|
|
#step3_env.js: Reader.elm Printer.elm Utils.elm Types.elm Env.elm
|
|
|
|
step4_if_fn_do.js: $(SOURCES_BASE)
|
2017-06-14 16:49:27 +03:00
|
|
|
step5_tco.js: $(SOURCES_BASE)
|
2017-06-15 22:23:37 +03:00
|
|
|
step6_file.js: $(SOURCES_BASE)
|
2017-06-18 23:21:25 +03:00
|
|
|
step7_quote.js: $(SOURCES_BASE)
|
2017-06-04 12:54:24 +03:00
|
|
|
# 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
|
|
|
|
|
|
|
|
clean:
|
|
|
|
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]"
|