diff options
Diffstat (limited to 'go/Makefile')
| -rw-r--r-- | go/Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/go/Makefile b/go/Makefile index 7b7f2f1..8aebd88 100644 --- a/go/Makefile +++ b/go/Makefile @@ -4,13 +4,13 @@ export GOPATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) SOURCES_BASE = src/types/types.go src/reader/reader.go src/printer/printer.go \ src/env/env.go src/core/core.go -SOURCES_LISP = src/step5_tco/step5_tco.go +SOURCES_LISP = src/step6_file/step6_file.go SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) ##################### SRCS = step0_repl.go step1_read_print.go step2_eval.go step3_env.go \ - step4_if_fn_do.go step5_tco.go + step4_if_fn_do.go step5_tco.go step6_file.go BINS = $(SRCS:%.go=%) ##################### @@ -20,8 +20,12 @@ all: $(BINS) mal mal: $(word $(words $(BINS)),$(BINS)) cp $< $@ -$(BINS): $(SOURCES_BASE) $(SOURCES_LISP) - go build $@ +define dep_template +$(1): $(SOURCES_BASE) src/$(1)/$(1).go + go build $$@ +endef + +$(foreach b,$(BINS),$(eval $(call dep_template,$(b)))) clean: rm -f $(BINS) mal |
