Commit cc72712ab1b9bf18442d29f833a51c8825aa5eec

Authored by Georg Hopp
1 parent b547622b

Fix variable dependencies

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