Code

Refresh VERSION file when building distribution tarball in "make dist"
authorJakub Narebski <jnareb@gmail.com>
Fri, 1 Jun 2007 16:34:28 +0000 (18:34 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Sat, 2 Jun 2007 09:01:18 +0000 (11:01 +0200)
Overwrite contents of VERSION file from the HEAD revision with the
current version (at the time of building), so VERSION file in the
tarball generated by "make dist" (and which follows also rpm package
generated by "make rpm") is up to date.

Otherwise for example when building rpm it will be compiled with wrong
version string.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Makefile

index 0e42de61f0c927ba77db66549828f52c34b7495f..bc8086fdcf7a8494e2e719607972d64403e7ad35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,10 @@ dist: tig.spec
        git-archive --format=tar --prefix=$(TARNAME)/ HEAD > $(TARNAME).tar
        @mkdir -p $(TARNAME)
        @cp tig.spec $(TARNAME)
-       tar rf $(TARNAME).tar $(TARNAME)/tig.spec
+       echo $(VERSION) > $(TARNAME)/VERSION
+       tar rf $(TARNAME).tar \
+              $(TARNAME)/tig.spec \
+              $(TARNAME)/VERSION
        @rm -rf $(TARNAME)
        gzip -f -9 $(TARNAME).tar