Common Lisp: Add documentation
[jackhill/mal.git] / rust / Makefile
1 #####################
2
3 SOURCES_BASE = src/types.rs src/readline.rs \
4 src/reader.rs src/printer.rs \
5 src/env.rs src/core.rs
6 SOURCES_LISP = src/env.rs src/core.rs src/bin/stepA_mal.rs
7 SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
8
9 #####################
10
11 SRCS = step1_read_print.rs step2_eval.rs step3_env.rs \
12 step4_if_fn_do.rs step5_tco.rs step6_file.rs step7_quote.rs \
13 step8_macros.rs step9_try.rs stepA_mal.rs
14 BINS = $(SRCS:%.rs=target/release/%)
15
16 #####################
17
18 all: $(BINS)
19
20 dist: mal
21
22 mal: target/release/stepA_mal
23 cp $< $@
24
25 # TODO: would be nice to build just the step requested
26 $(BINS): target/release/%: src/bin/%.rs $(wildcard src/*.rs)
27 cargo build --release
28
29 clean:
30 cargo clean
31 rm -f mal
32
33 .PHONY: stats stats-lisp mal
34
35 stats: $(SOURCES)
36 @wc $^
37 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
38 stats-lisp: $(SOURCES_LISP)
39 @wc $^
40 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*//|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"