mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 22:28:26 +03:00
8a19f60386
- Reorder README to have implementation list after "learning tool" bullet. - This also moves tests/ and libs/ into impls. It would be preferrable to have these directories at the top level. However, this causes difficulties with the wasm implementations which need pre-open directories and have trouble with paths starting with "../../". So in lieu of that, symlink those directories to the top-level. - Move the run_argv_test.sh script into the tests directory for general hygiene.
37 lines
877 B
Makefile
37 lines
877 B
Makefile
clojure_MODE ?= clj
|
|
SOURCES_UTIL = src/mal/readline.$(clojure_MODE)
|
|
SOURCES_BASE = $(SOURCES_UTIL) src/mal/reader.cljc 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
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
|
|
|
DEPS = $(if $(filter cljs,$(clojure_MODE)),node_modules,deps)
|
|
|
|
dist: $(if $(filter cljs,$(clojure_MODE)),node_modules,mal.jar mal)
|
|
|
|
deps:
|
|
lein deps
|
|
|
|
mal.jar: $(SOURCES)
|
|
lein with-profile stepA uberjar
|
|
cp target/stepA_mal.jar $@
|
|
|
|
SHELL := bash
|
|
mal: mal.jar
|
|
cat <(echo -e '#!/bin/sh\nexec java -jar "$$0" "$$@"') mal.jar > $@
|
|
chmod +x mal
|
|
|
|
src/mal/%.cljc: $(DEPS)
|
|
@true
|
|
|
|
#src/mal/stepA_mal.cljc: $(DEPS)
|
|
|
|
target/%.jar: src/mal/%.cljc $(SRCS)
|
|
lein with-profile $(word 1,$(subst _, ,$*)) uberjar
|
|
|
|
node_modules:
|
|
npm install
|
|
|
|
clean:
|
|
rm -rf target/ mal.jar mal
|