summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-23 15:28:36 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-23 15:28:36 (EST)
commitd50d3b6042d92798b52806127023f07560ee4be8 (patch)
tree457c254ad6b1754dbb4e6fec2fc8060bd8f48e30 /Makefile.am
parent3fb3f705281abe0b5b822ce1693dd7a5556f7c98 (diff)
Makefile.am: Set and use PACKAGE_VERSION_GIT if IN_GIT
Diffstat (limited to 'Makefile.am')
-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