test/tools: rebuild when files are changed
Add all go files as source to make sure we rebuild the tools when
required.
@@ -3,6 +3,8 @@ GO_BUILD=$(GO) build
BUILDDIR := build
+SOURCES := $(shell find . -name '*.go')
+
all: $(BUILDDIR)
.PHONY: vendor
@@ -22,14 +24,14 @@ $(BUILDDIR): \
$(BUILDDIR)/git-validation \
$(BUILDDIR)/ginkgo
-$(BUILDDIR)/goimports:
+$(BUILDDIR)/goimports: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/golang.org/x/tools/cmd/goimports
-$(BUILDDIR)/go-md2man:
+$(BUILDDIR)/go-md2man: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/cpuguy83/go-md2man/v2
-$(BUILDDIR)/git-validation:
+$(BUILDDIR)/git-validation: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/vbatts/git-validation
-$(BUILDDIR)/ginkgo:
+$(BUILDDIR)/ginkgo: $(SOURCES)
$(GO_BUILD) -o $@ ./vendor/github.com/onsi/ginkgo/ginkgo
