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