Merge pull request #281 from sebras/master
[jackhill/mal.git] / bash / Makefile
1 SOURCES_BASE = types.sh reader.sh printer.sh
2 SOURCES_LISP = env.sh core.sh stepA_mal.sh
3 SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
4
5 all:
6 true
7
8 dist: mal.sh mal
9
10 mal.sh: $(SOURCES)
11 cat $+ | grep -v "^source " > $@
12
13 mal: mal.sh
14 echo "#!/usr/bin/env bash" > $@
15 cat $< >> $@
16 chmod +x $@
17
18 clean:
19 rm -f mal.sh mal
20
21 .PHONY: stats
22
23 stats: $(SOURCES)
24 @wc $^
25 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
26 stats-lisp: $(SOURCES_LISP)
27 @wc $^
28 @printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"