From: Andre Noll Date: Sun, 3 Aug 2014 09:44:48 +0000 (+0200) Subject: build: Use git version for tarball and AC_INIT(). X-Git-Tag: v0.5.4~46^2~1 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=04e257faa3b0a13cb2b0698ace9a7f70ac0d0b1b;hp=53f735e056015f9a1021c14b5d93f57f14035c62 build: Use git version for tarball and AC_INIT(). It's kind of silly to use "git" as the version string at all times except for releases. This commit changes the name of the generated tarball to use the output of git describe. Hence the "tarball" target creates a tarball named according to the current git HEAD. For compatibility we provide a symlink with the old name. --- diff --git a/.gitignore b/.gitignore index b9190f28..6df2e505 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ config.log config.status Makefile TODO -paraslash-git.tar.bz2 +paraslash-*.tar.bz2 web/dia/overview.pdf *.swp error2.h diff --git a/Makefile.real b/Makefile.real index a8e4767d..13933b78 100644 --- a/Makefile.real +++ b/Makefile.real @@ -51,7 +51,7 @@ play_objs := $(addprefix $(object_dir)/, $(play_objs)) man_pages := $(patsubst %, $(man_dir)/%.1, $(prefixed_executables)) autocrap := config.h.in configure -tarball_pfx := $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) +tarball_pfx := $(PACKAGE_TARNAME)-$(shell git describe --dirty) tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore) tarball := $(tarball_pfx).tar.bz2 @@ -343,4 +343,5 @@ $(tarball): $(Q) tar rf $(tarball_pfx).tar $(tarball_pfx)/* $(Q) bzip2 -9 $(tarball_pfx).tar $(Q) ls -l $(tarball) + $(Q) ln -sf $(tarball) paraslash-git.tar.bz2 $(Q) rm -rf $(tarball_pfx) diff --git a/configure.ac b/configure.ac index c3dd6b1f..79b41a3a 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,8 @@ AC_PREREQ([2.61]) -AC_INIT([paraslash],[git],[maan@tuebingen.mpg.de]) +AC_INIT([paraslash], [m4_esyscmd_s(./GIT-VERSION-GEN)], + [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/paraslash/]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile])