From d50d3b6042d92798b52806127023f07560ee4be8 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 23 Jan 2016 15:28:36 -0500 Subject: Makefile.am: Set and use PACKAGE_VERSION_GIT if IN_GIT --- 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 -- cgit v0.9.1