From ad95503cea8ca85e9188effa87681275283157bf Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 6 Oct 2014 22:27:28 -0500 Subject: go: add step6_file --- go/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'go/Makefile') 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 -- cgit v1.2.3