Common Lisp: Add documentation
[jackhill/mal.git] / ruby / Makefile
1 TESTS =
2
3 SOURCES_BASE = mal_readline.rb types.rb reader.rb printer.rb
4 SOURCES_LISP = env.rb core.rb stepA_mal.rb
5 SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
6
7 all:
8 true
9
10 dist: mal.rb mal
11
12 mal.rb: $(SOURCES)
13 cat $+ | grep -v "^require_relative" > $@
14
15 mal: mal.rb
16 echo "#!/usr/bin/env ruby" > $@
17 cat $< >> $@
18 chmod +x $@
19
20 clean:
21 rm -f mal.rb mal
22
23 .PHONY: stats tests $(TESTS)
24
25 stats: $(SOURCES)
26 @wc $^
27 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
28 stats-lisp: $(SOURCES_LISP)
29 @wc $^
30 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
31
32 tests: $(TESTS)
33
34 $(TESTS):
35 @echo "Running $@"; \
36 ruby $@ || exit 1; \