From cc72712ab1b9bf18442d29f833a51c8825aa5eec Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Wed, 3 Oct 2018 13:39:18 +0200 Subject: [PATCH] Fix variable dependencies --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3f376ef..41f8962 100644 --- a/Makefile +++ b/Makefile @@ -13,16 +13,18 @@ GOARCH = $(shell go env GOARCH) LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a -.PHONY: all clean +.PHONY: all clean .version.new all: $(LIBRARY) $(LIBRARY): $(SOURCES) go install $(PACKAGE) -.version: - -@printf "%s\n%s\n%s" "$(VERSION)" "$(REVISION)" >$@.new - -@diff $@ $@.new >/dev/null 2>&1 && rm $@.new || mv $@.new $@ +.version.new: + -@printf "%s\n%s\n%s" "$(VERSION)" "$(REVISION)" >$@ + +.version: .version.new + -@diff $@ $< >/dev/null 2>&1 && rm $< || mv $< $@ version.go: version.go.m4 .version -@m4 -Dm4_version=$(VERSION) \