2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
TESTS =
|
|
|
|
|
|
|
|
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES_BASE = mal_readline.py mal_types.py reader.py printer.py
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = env.py core.py stepA_mal.py
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
|
|
|
|
2016-02-18 09:33:19 +03:00
|
|
|
all:
|
2015-10-06 01:23:21 +03:00
|
|
|
true
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
dist: mal.pyz mal
|
2016-02-18 09:33:19 +03:00
|
|
|
|
|
|
|
SHELL := bash
|
|
|
|
mal.pyz: $(SOURCES)
|
|
|
|
cp stepA_mal.py __main__.py
|
2016-02-24 09:45:40 +03:00
|
|
|
zip -q - __main__.py $+ > $@
|
2016-02-18 09:33:19 +03:00
|
|
|
rm __main__.py
|
2016-02-24 09:45:40 +03:00
|
|
|
|
|
|
|
mal: mal.pyz
|
|
|
|
echo '#!/usr/bin/env python' > $@
|
|
|
|
cat $< >> $@
|
2015-10-06 02:55:00 +03:00
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
clean:
|
2016-02-24 09:45:40 +03:00
|
|
|
rm -f mal.pyz mal
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
.PHONY: stats tests $(TESTS)
|
|
|
|
|
|
|
|
stats: $(SOURCES)
|
|
|
|
@wc $^
|
2015-10-27 06:33:49 +03:00
|
|
|
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
|
2014-04-11 04:27:42 +04:00
|
|
|
stats-lisp: $(SOURCES_LISP)
|
|
|
|
@wc $^
|
2015-10-27 06:33:49 +03:00
|
|
|
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
tests: $(TESTS)
|
|
|
|
|
|
|
|
$(TESTS):
|
|
|
|
@echo "Running $@"; \
|
|
|
|
python $@ || exit 1; \
|