2015-03-15 17:13:47 +03:00
|
|
|
#####################
|
|
|
|
|
2015-10-08 05:46:12 +03:00
|
|
|
SOURCES_BASE = src/atom.erl src/printer.erl src/reader.erl
|
|
|
|
SOURCES_LISP = src/core.erl src/env.erl src/types.erl src/stepA_mal.erl
|
|
|
|
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
2015-03-15 17:13:47 +03:00
|
|
|
|
|
|
|
#####################
|
|
|
|
|
2015-03-23 08:20:44 +03:00
|
|
|
SRCS = step0_repl.erl step1_read_print.erl step2_eval.erl step3_env.erl step4_if_fn_do.erl \
|
2015-03-31 07:38:07 +03:00
|
|
|
step5_tco.erl step6_file.erl step7_quote.erl step8_macros.erl step9_try.erl stepA_mal.erl
|
2015-03-15 17:13:47 +03:00
|
|
|
BINS = $(SRCS:%.erl=%)
|
|
|
|
|
|
|
|
#####################
|
|
|
|
|
2019-03-21 07:32:35 +03:00
|
|
|
.PHONY: all dist clean
|
2015-03-19 05:37:00 +03:00
|
|
|
|
2016-02-15 05:57:31 +03:00
|
|
|
all: $(BINS)
|
|
|
|
|
|
|
|
dist: mal
|
|
|
|
|
|
|
|
mal: $(SOURCES)
|
|
|
|
sed 's/stepA_mal/mal/' src/stepA_mal.erl > src/mal.erl
|
|
|
|
MAL_STEP=mal rebar compile escriptize
|
|
|
|
rm src/mal.erl
|
2015-03-15 17:13:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
define dep_template
|
2015-03-19 05:37:00 +03:00
|
|
|
.PHONY: $(1)
|
2015-10-08 05:46:12 +03:00
|
|
|
$(1): src/$(1).erl
|
2015-03-15 17:13:47 +03:00
|
|
|
MAL_STEP=$(1) rebar compile escriptize
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach b,$(BINS),$(eval $(call dep_template,$(b))))
|
|
|
|
|
|
|
|
clean:
|
2015-03-19 05:37:00 +03:00
|
|
|
rebar clean
|
2016-02-18 09:33:19 +03:00
|
|
|
rm -f mal
|