2014-04-01 08:05:41 +04:00
|
|
|
|
|
|
|
TESTS =
|
|
|
|
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES_BASE = types.ps reader.ps printer.ps
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = env.ps core.ps stepA_mal.ps
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2014-04-01 08:05:41 +04:00
|
|
|
|
2016-02-18 09:33:19 +03:00
|
|
|
all:
|
|
|
|
true
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
dist: mal.ps mal
|
2016-02-18 09:33:19 +03:00
|
|
|
|
|
|
|
mal.ps: $(SOURCES)
|
2016-02-24 09:45:40 +03:00
|
|
|
cat $+ | grep -v "runlibfile$$" > $@
|
|
|
|
|
|
|
|
mal: mal.ps
|
2016-02-18 09:33:19 +03:00
|
|
|
echo "#!/bin/sh" > $@
|
|
|
|
echo "\":\" pop pop pop pop %#; exec gs -d'#!'=null -d'\":\"'=null -q -dNODISPLAY -- \"\$$0\" \"\$$@\"" >> $@
|
2016-02-24 09:45:40 +03:00
|
|
|
cat $< >> $@
|
2016-02-18 09:33:19 +03:00
|
|
|
chmod +x $@
|
|
|
|
|
|
|
|
clean:
|
2016-02-24 09:45:40 +03:00
|
|
|
rm -f mal.ps mal
|
2016-02-18 09:33:19 +03:00
|
|
|
|
|
|
|
|
2014-04-01 08:05:41 +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-04-01 08:05:41 +04:00
|
|
|
|
|
|
|
tests: $(TESTS)
|
|
|
|
|
|
|
|
$(TESTS):
|
|
|
|
@echo "Running $@"; \
|
|
|
|
gs -q -dNODISPLAY -- $@ || exit 1; \
|