1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00
mal/clojure/Makefile
Joel Martin 20e8dea043 Refactor to use run scripts, remove *_RUNSTEP
- Add */run script for every implementation.

- Refactor Clojure build to allow individual jar files for each step.

- Update FFI version for es6 and miniMAL to work with newer node
  versions.

The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
2016-05-18 22:29:18 -07:00

36 lines
870 B
Makefile

SOURCES_BASE = src/readline.clj src/reader.clj src/printer.clj
SOURCES_LISP = src/env.clj src/core.clj src/stepA_mal.clj
SRCS = $(SOURCES_BASE) src/env.clj src/core.clj
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
all: deps
dist: mal.jar mal
deps:
lein deps
mal.jar: $(SOURCES)
lein with-profile stepA uberjar
cp target/mal-0.0.1-SNAPSHOT-standalone.jar $@
SHELL := bash
mal: mal.jar
cat <(echo -e '#!/bin/sh\nexec java -jar "$$0" "$$@"') mal.jar > $@
chmod +x mal
target/%.jar: src/%.clj $(SRCS)
lein with-profile $(word 1,$(subst _, ,$*)) uberjar
clean:
rm -rf target/ mal.jar mal
.PHONY: stats
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]"