summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index a68753a..94a047a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,12 @@ include $(top_srcdir)/man/local.mk
include $(top_srcdir)/locale/local.mk
include $(top_srcdir)/tests/local.mk
+if IN_GIT
+PACKAGE_VERSION_GIT = $$(git describe --tags --dirty | sed 's|^.*/||')
+else
+PACKAGE_VERSION_GIT = $(PACKAGE_VERSION)
+endif
+
bin_SCRIPTS = $(bin_sources:.sh=)
pkgdata_SCRIPTS = $(pkgdata_sources:.sh=.sm)
pkgdatacmd_SCRIPTS = $(pkgdatacmd_sources:.sh=.sm)
@@ -52,7 +58,7 @@ SUFFIXES = .sh .sm .1in .1 .ms
textdomain = $$(printf '%s\n' '$(PACKAGE)' | sed -e 's|-|_|g')
do_subst = sed \
-e 's|@[@]PACKAGE_NAME[@]@|$(PACKAGE)|g' \
- -e 's|@[@]PACKAGE_VERSION[@]@|$(PACKAGE_VERSION)|g' \
+ -e 's|@[@]PACKAGE_VERSION[@]@|$(PACKAGE_VERSION_GIT)|g' \
-e 's|@[@]PACKAGE_DESCRIPTION[@]@|$(PACKAGE_NAME)|g' \
-e 's|@[@]PKGLIBDIR[@]@|$(pkgdatadir)|g' \
-e 's|@[@]PKGLIBCMDDIR[@]@|$(pkgdatacmddir)|g' \
@@ -61,7 +67,7 @@ do_subst = sed \
-e 's|@[@]PKGLIBCMD[@]@|$(pkgdatacmd_SCRIPTS)|g' \
-e 's|[@]PACKAGE[@]|$(PACKAGE)|g' \
-e 's|[@]PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
- -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
+ -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION_GIT)|g' \
-e 's|[@]SH[@]|$(SH)|g' \
-e 's|[@]bindir[@]|$(bindir)|g' \
-e 's|[@]pkgdatadir[@]|$(pkgdatadir)|g' \