From 04e257faa3b0a13cb2b0698ace9a7f70ac0d0b1b Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 3 Aug 2014 11:44:48 +0200 Subject: [PATCH] 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. --- .gitignore | 2 +- Makefile.real | 3 ++- configure.ac | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) 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]) -- 2.39.5