Commit 1c0a8fcd9f2756c77f1393bf939e45d7f79e9703

Authored by Georg Hopp
1 parent a411284e

Fix variable dependencies

Showing 1 changed file with 6 additions and 4 deletions
@@ -12,16 +12,18 @@ GOARCH = $(shell go env GOARCH) @@ -12,16 +12,18 @@ GOARCH = $(shell go env GOARCH)
12 12
13 LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a 13 LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a
14 14
15 -.PHONY: all clean 15 +.PHONY: all clean .version.new
16 16
17 all: $(LIBRARY) 17 all: $(LIBRARY)
18 18
19 $(LIBRARY): $(SOURCES) 19 $(LIBRARY): $(SOURCES)
20 go install $(PACKAGE) 20 go install $(PACKAGE)
21 21
22 -.version:  
23 - -@printf "%s\n%s\n%s" "$(VERSION)" "$(REVISION)" >$@.new  
24 - -@diff $@ $@.new >/dev/null 2>&1 && rm $@.new || mv $@.new $@ 22 +.version.new:
  23 + -@printf "%s\n" "$(VERSION)" "$(REVISION)" >$@
  24 +
  25 +.version: .version.new
  26 + -@diff $@ $< >/dev/null 2>&1 && rm $< || mv $< $@
25 27
26 version.go: version.go.m4 .version 28 version.go: version.go.m4 .version
27 -@m4 -Dm4_version=$(VERSION) \ 29 -@m4 -Dm4_version=$(VERSION) \
Please register or login to post a comment