1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 02:45:44 +03:00
mal/perl/Makefile
Joel Martin bcfd8b7020 Generic recursive rules for dist, stats, clean
Also add missing clean rules for julia and matlab and fix perl clean
rule.
2016-02-24 01:09:19 -06:00

43 lines
972 B
Makefile

TESTS =
SOURCES_BASE = readline.pm types.pm reader.pm printer.pm \
interop.pm
SOURCES_LISP = env.pm core.pm stepA_mal.pl
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all:
dist: mal.pl mal
mal.pl: $(SOURCES)
#fatpack pack ./stepA_mal.pl > $@
fatpack trace ./stepA_mal.pl
fatpack packlists-for `cat fatpacker.trace` > packlists
fatpack tree `cat packlists`
cp $+ fatlib/
(fatpack file; cat ./stepA_mal.pl) > mal.pl
mal: mal.pl
echo "#!/usr/bin/env perl" > $@
cat $< >> $@
chmod +x $@
clean:
rm -f mal.pl mal fatpacker.trace packlists fatlib/*
[ -d fatlib ] && rmdir fatlib || true
.PHONY: stats tests $(TESTS)
stats: $(SOURCES)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
stats-lisp: $(SOURCES_LISP)
@wc $^
@printf "%5s %5s %5s %s\n" `grep -E "^[[:space:]]*#|^[[:space:]]*$$" $^ | wc` "[comments/blanks]"
tests: $(TESTS)
$(TESTS):
@echo "Running $@"; \
ruby $@ || exit 1; \