Showing
1 changed file
with
6 additions
and
4 deletions
@@ -13,16 +13,18 @@ GOARCH = $(shell go env GOARCH) | @@ -13,16 +13,18 @@ GOARCH = $(shell go env GOARCH) | ||
13 | 13 | ||
14 | LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a | 14 | LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a |
15 | 15 | ||
16 | -.PHONY: all clean | 16 | +.PHONY: all clean .version.new |
17 | 17 | ||
18 | all: $(LIBRARY) | 18 | all: $(LIBRARY) |
19 | 19 | ||
20 | $(LIBRARY): $(SOURCES) | 20 | $(LIBRARY): $(SOURCES) |
21 | go install $(PACKAGE) | 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 | version.go: version.go.m4 .version | 29 | version.go: version.go.m4 .version |
28 | -@m4 -Dm4_version=$(VERSION) \ | 30 | -@m4 -Dm4_version=$(VERSION) \ |
Please
register
or
login
to post a comment