mirror of
https://github.com/kanaka/mal.git
synced 2024-09-20 01:57:09 +03:00
a61ea75a99
make test^erlang^step0 passes make test^erlang^step1 passes make test^erlang^step2 passes make test^erlang^step3 passes make test^erlang^step4 passes
37 lines
828 B
Makefile
37 lines
828 B
Makefile
#####################
|
|
|
|
SOURCES_BASE = src/step0_repl.erl src/step1_read_print.erl src/step2_eval.erl src/step3_env.erl \
|
|
src/step4_if_fn_do.erl
|
|
SOURCES_LISP = src/core.erl src/env.erl src/printer.erl src/reader.erl src/types.erl
|
|
SOURCES = $(SOURCES_BASE) $(word $(words $(SOURCES_LISP)),${SOURCES_LISP})
|
|
|
|
#####################
|
|
|
|
SRCS = step0_repl.erl step1_read_print.erl step2_eval.erl step3_env.erl step4_if_fn_do.erl
|
|
BINS = $(SRCS:%.erl=%)
|
|
|
|
#####################
|
|
|
|
.PHONY: all mal clean stats stats-lisp
|
|
|
|
all: $(BINS) mal
|
|
|
|
mal: $(word $(words $(BINS)),$(BINS))
|
|
cp $< $@
|
|
|
|
define dep_template
|
|
.PHONY: $(1)
|
|
$(1): $(SOURCES_BASE) src/$(1).erl
|
|
MAL_STEP=$(1) rebar compile escriptize
|
|
endef
|
|
|
|
$(foreach b,$(BINS),$(eval $(call dep_template,$(b))))
|
|
|
|
clean:
|
|
rebar clean
|
|
|
|
stats: $(SOURCES)
|
|
@wc $^
|
|
stats-lisp: $(SOURCES_LISP)
|
|
@wc $^
|