Commit | Line | Data |
---|---|---|
80320efc JM |
1 | |
2 | RPYTHON = rpython | |
80320efc | 3 | |
11b4be99 | 4 | UPPER_STEPS = step4_if_fn_do step5_tco step6_file step7_quote step8_macros step9_try stepA_mal |
ab02c5bb | 5 | STEPS = step0_repl step1_read_print step2_eval step3_env $(UPPER_STEPS) |
11b4be99 | 6 | |
ab02c5bb JM |
7 | SOURCES_BASE = mal_readline.py mal_types.py reader.py printer.py |
8 | SOURCES_LISP = env.py core.py stepA_mal.py | |
9 | SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) | |
80320efc JM |
10 | |
11 | all: $(STEPS) | |
12 | ||
5245b079 JM |
13 | dist: mal |
14 | ||
15 | mal: stepA_mal | |
16 | cp $< $@ | |
17 | ||
80320efc JM |
18 | %: %.py |
19 | $(RPYTHON) --output=$@ $< | |
20 | ||
11b4be99 JM |
21 | STEP0_DEPS = mal_readline.py |
22 | STEP1_DEPS = $(STEP0_DEPS) mal_types.py reader.py printer.py | |
23 | STEP3_DEPS = $(STEP1_DEPS) env.py | |
24 | STEP4_DEPS = $(STEP3_DEPS) core.py | |
25 | ||
26 | step0_repl: $(STEP0_DEPS) | |
27 | step1_read_print step2_eval: $(STEP1_DEPS) | |
28 | step3_env: $(STEP3_DEPS) | |
29 | $(UPPER_STEPS): $(STEP4_DEPS) | |
80320efc | 30 | |
ab02c5bb JM |
31 | .PHONY: clean stats stats-lisp |
32 | ||
80320efc | 33 | clean: |
5245b079 | 34 | rm -f mal $(STEPS) *.pyc |
fc4c7889 | 35 | rm -rf __pycache__ |
ab02c5bb JM |
36 | |
37 | stats: $(SOURCES) | |
38 | @wc $^ | |
f15b4021 | 39 | @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]" |
ab02c5bb JM |
40 | stats-lisp: $(SOURCES_LISP) |
41 | @wc $^ | |
f15b4021 | 42 | @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]" |
ab02c5bb | 43 |