diff options
-rw-r--r-- | Makefile | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -55,13 +55,12 @@ all: $(derived-assets) $(objects): Makefile src/$(NAME).a: src/$(NAME).go - go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go +tests/main.a: tests/main.go tests/$(NAME).a +src/$(NAME).a tests/main.a: + go tool compile $(GOCFLAGS) -o $@ -p $(*F) -I $(@D) $*.go tests/$(NAME).a: tests/$(NAME).go src/$(NAME).go - go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(NAME).go - -tests/main.a: tests/main.go tests/$(NAME).a - go tool compile $(GOCFLAGS) -o $@ -I $(@D) $*.go + go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(*F).go tests/main.bin: tests/main.a go tool link $(GOLDFLAGS) -o $@ -L $(@D) $*.a @@ -69,10 +68,10 @@ tests/main.bin: tests/main.a tests.bin-check = \ - tests/main.bin/1 \ - tests/main.bin/2 \ - tests/main.bin/3 \ - tests/main.bin/4 \ + tests/main.bin/1 \ + tests/main.bin/2 \ + tests/main.bin/3 \ + tests/main.bin/4 \ $(tests.bin-check): tests/main.bin $(tests.bin-check): @@ -83,6 +82,11 @@ check-unit: $(tests.bin-check) integration-tests = \ +.PRECIOUS: $(integration-tests) +$(integration-tests): $(NAME).bin +$(integration-tests): ALWAYS + sh $@ + check-integration: $(integration-tests) |