Merge branch 'issue_166_string_ops' of github.com:kanaka/mal into issue_166_string_ops
[jackhill/mal.git] / rpython / Makefile
1
2 RPYTHON = rpython
3
4 UPPER_STEPS = step4_if_fn_do step5_tco step6_file step7_quote step8_macros step9_try stepA_mal
5 STEPS = step0_repl step1_read_print step2_eval step3_env $(UPPER_STEPS)
6
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)
10
11 all: $(STEPS)
12
13 dist: mal
14
15 mal: stepA_mal
16 cp $< $@
17
18 %: %.py
19 $(RPYTHON) --output=$@ $<
20
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)
30
31 .PHONY: clean stats stats-lisp
32
33 clean:
34 rm -f mal $(STEPS) *.pyc
35 rm -rf __pycache__
36
37 stats: $(SOURCES)
38 @wc $^
39 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
40 stats-lisp: $(SOURCES_LISP)
41 @wc $^
42 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
43