crystal: fix Makefile to build all steps

This commit is contained in:
rhysd 2015-05-30 02:07:59 +09:00
parent 6e7390b73b
commit 86fe63145a
2 changed files with 28 additions and 2 deletions

View file

@ -57,7 +57,7 @@ c_STEP_TO_PROG = c/$($(1))
clojure_STEP_TO_PROG = clojure/src/$($(1)).clj
coffee_STEP_TO_PROG = coffee/$($(1)).coffee
cpp_STEP_TO_PROG = cpp/$($(1))
crystal_STEP_TO_PROG = crystal/$($(1)).cr
crystal_STEP_TO_PROG = crystal/$($(1))
cs_STEP_TO_PROG = cs/$($(1)).exe
erlang_STEP_TO_PROG = erlang/$($(1))
factor_STEP_TO_PROG = factor/src/$($(1))/$($(1)).factor
@ -99,7 +99,7 @@ c_RUNSTEP = ../$(2) $(3)
clojure_RUNSTEP = lein with-profile +$(1) trampoline run $(3)
coffee_RUNSTEP = coffee ../$(2) $(3)
cpp_RUNSTEP = ../$(2) $(3)
crystal_RUNSTEP = crystal run ../$(2) $(3)
crystal_RUNSTEP = ../$(2) $(3)
cs_RUNSTEP = mono ../$(2) --raw $(3)
erlang_RUNSTEP = ../$(2) $(3)
factor_RUNSTEP = factor ../$(2) $(3)

26
crystal/Makefile Normal file
View file

@ -0,0 +1,26 @@
STEPS = step0_repl.cr step1_read_print.cr step2_eval.cr step3_env.cr \
step4_if_fn_do.cr step5_tco.cr step6_file.cr step7_quote.cr \
step8_macros.cr step9_try.cr stepA_mal.cr
STEP_BINS = $(STEPS:%.cr=%)
LAST_STEP_BIN = $(word $(words $(STEP_BINS)),$(STEP_BINS))
all: $(STEP_BINS) mal
mal: $(LAST_STEP_BIN)
cp $< $@
$(STEP_BINS): %: %.cr $(MAL_LIB)
crystal build --release $<
clean:
rm -rf $(STEP_BINS) mal .crystal
stats: $(MODULES) stepA_mal.cr
@wc $^
stats-lisp: env.cr core.cr stepA_mal.cr
@wc $^
.PHONY: all clean stats stats-lisp