summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 65d722f..6bf800e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,12 @@
MANUAL = ProteanOS Development Kit Manual
TEXTDOMAIN = $$(printf '%s\n' '$(PACKAGE)' | sed -e 's|-|_|g')
+if IN_GIT
+PACKAGE_VERSION_GIT = $$(git describe --tags --dirty | sed 's|^.*/||')
+else
+PACKAGE_VERSION_GIT = $(PACKAGE_VERSION)
+endif
+
SUFFIXES = .sh .sho .ms .1in .1 .8in .8
LINK = '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh
@@ -39,7 +45,7 @@ man1_MANS = $(man1_sources:.1in=.1)
man8_MANS = $(man8_sources:.8in=.8)
do_subst = sed \
-e 's|[@]PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
- -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
+ -e "s|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION_GIT)|g" \
-e 's|[@]MANUAL[@]|$(MANUAL)|g'
noinst_DATA = $(locale_MESSAGES) .builddirstamp