diff options
author | P. J. McDermott <pj@pehjota.net> | 2017-07-22 12:04:58 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2017-07-22 12:04:58 (EDT) |
commit | cc186a92f42e90318f74457574b13ae2a4dd9e52 (patch) | |
tree | a9f1527525d61945da10330991de09862cbbd780 | |
parent | 2bb8838e53bbf590220354bfa712a1d337b73946 (diff) |
Makefile.am: Set and use PACKAGE_VERSION_GIT
-rw-r--r-- | Makefile.am | 10 |
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' \ |