Showing
2 changed files
with
8 additions
and
1 deletions
@@ -18,7 +18,12 @@ all: $(LIBRARY) | @@ -18,7 +18,12 @@ all: $(LIBRARY) | ||
18 | $(LIBRARY): $(SOURCES) | 18 | $(LIBRARY): $(SOURCES) |
19 | go install $(PACKAGE) | 19 | go install $(PACKAGE) |
20 | 20 | ||
21 | -version.go: version.go.m4 | 21 | +.version: |
22 | + -@printf "%s\n%s\n%s" \ | ||
23 | + "$(VERSION)" "$(REVISION)" "$(BUILDTIME)" >$@.new | ||
24 | + -@diff $@ $@.new >/dev/null 2>&1 && rm $@.new || mv $@.new $@ | ||
25 | + | ||
26 | +version.go: version.go.m4 .version | ||
22 | -@m4 -Dm4_version=$(VERSION) \ | 27 | -@m4 -Dm4_version=$(VERSION) \ |
23 | -Dm4_revision=$(REVISION) \ | 28 | -Dm4_revision=$(REVISION) \ |
24 | -Dm4_build_time=$(BUILDTIME) \ | 29 | -Dm4_build_time=$(BUILDTIME) \ |
@@ -26,4 +31,5 @@ version.go: version.go.m4 | @@ -26,4 +31,5 @@ version.go: version.go.m4 | ||
26 | 31 | ||
27 | clean: | 32 | clean: |
28 | -@rm -f version.go 2>/dev/null | 33 | -@rm -f version.go 2>/dev/null |
34 | + -@rm -f .version 2>/dev/null | ||
29 | -@rm -f $(LIBRARY) 2>/dev/null | 35 | -@rm -f $(LIBRARY) 2>/dev/null |
Please
register
or
login
to post a comment