From 1824bc6ee6c67b248c478d3fdd0f1995cb652b6c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 8 Jun 2008 17:26:02 -0500 Subject: Allow use of GIT_VERSION in documentation dir Signed-off-by: Dan McGee --- doc/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index eba950e3..476a21c3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -32,6 +32,14 @@ EXTRA_DIST = \ MOSTLYCLEANFILES = *.xml MAINTAINERCLEANFILES = $(ASCIIDOC_MANS) +if USE_GIT_VERSION +GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty +REAL_PACKAGE_VERSION = $(GIT_VERSION) +else +REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) +endif + + man_MANS = dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8 @@ -47,7 +55,7 @@ endif if USE_ASCIIDOC ASCIIDOC_OPTS = \ -f asciidoc.conf \ - -a pacman_version="$(PACKAGE_VERSION)" \ + -a pacman_version="$(REAL_PACKAGE_VERSION)" \ -a pacman_date="`date +%Y-%m-%d`" \ -a sysconfdir=$(sysconfdir) A2X_OPTS = \ -- cgit v1.2.3-70-g09d2