From 1c0a8fcd9f2756c77f1393bf939e45d7f79e9703 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Wed, 3 Oct 2018 13:37:25 +0200 Subject: [PATCH] Fix variable dependencies --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1e644e4..dfaa3c5 100644 --- a/Makefile +++ b/Makefile @@ -12,16 +12,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" "$(VERSION)" "$(REVISION)" >$@ + +.version: .version.new + -@diff $@ $< >/dev/null 2>&1 && rm $< || mv $< $@ version.go: version.go.m4 .version -@m4 -Dm4_version=$(VERSION) \