86fe6314 |
1 | STEPS = step0_repl.cr step1_read_print.cr step2_eval.cr step3_env.cr \ |
2 | step4_if_fn_do.cr step5_tco.cr step6_file.cr step7_quote.cr \ |
3 | step8_macros.cr step9_try.cr stepA_mal.cr |
4 | |
5 | STEP_BINS = $(STEPS:%.cr=%) |
6 | LAST_STEP_BIN = $(word $(words $(STEP_BINS)),$(STEP_BINS)) |
7 | |
8 | all: $(STEP_BINS) mal |
9 | |
10 | mal: $(LAST_STEP_BIN) |
11 | cp $< $@ |
12 | |
13 | $(STEP_BINS): %: %.cr $(MAL_LIB) |
14 | crystal build --release $< |
15 | |
16 | clean: |
17 | rm -rf $(STEP_BINS) mal .crystal |
18 | |
abff2fa8 |
19 | stats: types.cr error.cr readline.cr reader.cr printer.cr env.cr core.cr stepA_mal.cr |
86fe6314 |
20 | @wc $^ |
f15b4021 |
21 | @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]" |
86fe6314 |
22 | stats-lisp: env.cr core.cr stepA_mal.cr |
23 | @wc $^ |
f15b4021 |
24 | @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]" |
86fe6314 |
25 | |
26 | .PHONY: all clean stats stats-lisp |
27 | |