2014-04-11 04:27:42 +04:00
|
|
|
SOURCES_BASE = src/readline.clj src/reader.clj src/printer.clj
|
2015-02-28 20:09:54 +03:00
|
|
|
SOURCES_LISP = src/env.clj src/core.clj src/stepA_mal.clj
|
2016-05-18 07:37:26 +03:00
|
|
|
SRCS = $(SOURCES_BASE) src/env.clj src/core.clj
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2016-02-18 09:33:19 +03:00
|
|
|
all: deps
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
dist: mal.jar mal
|
2016-02-15 05:57:31 +03:00
|
|
|
|
|
|
|
deps:
|
2015-10-06 06:18:57 +03:00
|
|
|
lein deps
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2016-02-15 05:57:31 +03:00
|
|
|
mal.jar: $(SOURCES)
|
2016-05-18 07:37:26 +03:00
|
|
|
lein with-profile stepA uberjar
|
2016-02-15 05:57:31 +03:00
|
|
|
cp target/mal-0.0.1-SNAPSHOT-standalone.jar $@
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
SHELL := bash
|
|
|
|
mal: mal.jar
|
|
|
|
cat <(echo -e '#!/bin/sh\nexec java -jar "$$0" "$$@"') mal.jar > $@
|
|
|
|
chmod +x mal
|
|
|
|
|
2016-05-18 07:37:26 +03:00
|
|
|
target/%.jar: src/%.clj $(SRCS)
|
|
|
|
lein with-profile $(word 1,$(subst _, ,$*)) uberjar
|
|
|
|
|
2016-02-24 09:45:40 +03:00
|
|
|
clean:
|
|
|
|
rm -rf target/ mal.jar mal
|
2016-02-15 05:57:31 +03:00
|
|
|
|
2014-04-28 02:58:48 +04:00
|
|
|
.PHONY: stats
|
2014-03-25 01:32:24 +04:00
|
|
|
|
|
|
|
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]"
|