diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-22 21:42:43 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-22 21:42:43 (EST) |
commit | 3c6cac5e14046c3665f5d294b8846aac7c546062 (patch) | |
tree | 6a62b5b9b808b811ce217bd9896d73e29a16921c | |
parent | 41d5e7b3fc646e6565aead0be557da6add6dd73d (diff) |
configure.ac, Makefile.am: Set PACKAGE_VERSION_GIT
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 76d8f2c..d2e114f 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 + MANUAL = Distribution Build System SHSOEXT = .shso diff --git a/configure.ac b/configure.ac index bbfbb89..cf15e27 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,9 @@ AC_CONFIG_SRCDIR([src/opkbuild.sh]) AM_INIT_AUTOMAKE([gnu check-news dist-bzip2 dist-xz subdir-objects]) AM_SILENT_RULES([yes]) +AM_CONDITIONAL([IN_GIT], + [test -d "${srcdir}/.git" && command -v git >/dev/null 2>&1]) + AC_ARG_WITH( [sh], [AS_HELP_STRING([--with-sh=PATH], |