2017-02-11 08:58:37 +03:00
|
|
|
CLJ_MODE ?= clj
|
|
|
|
SOURCES_UTIL = src/mal/readline.$(CLJ_MODE)
|
|
|
|
SOURCES_BASE = $(SOURCES_UTIL) src/mal/printer.cljc
|
|
|
|
SOURCES_LISP = src/mal/env.cljc src/mal/core.cljc src/mal/stepA_mal.cljc
|
|
|
|
SRCS = $(SOURCES_BASE) src/mal/env.cljc src/mal/core.cljc
|
2014-04-11 04:27:42 +04:00
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2014-03-25 01:32:24 +04:00
|
|
|
|
2017-02-11 08:58:37 +03:00
|
|
|
all: deps node_modules
|
2016-02-18 09:33:19 +03:00
|
|
|
|
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
|
|
|
|
|
2017-02-11 08:58:37 +03:00
|
|
|
target/%.jar: src/mal/%.cljc $(SRCS)
|
2016-05-18 07:37:26 +03:00
|
|
|
lein with-profile $(word 1,$(subst _, ,$*)) uberjar
|
|
|
|
|
2017-02-11 08:58:37 +03:00
|
|
|
node_modules:
|
|
|
|
npm install
|
|
|
|
|
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]"
|