Build: IPA_VERSION_IS_GIT_SNAPSHOT checks if source directory is Git repo

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
Petr Spacek
2016-11-09 16:15:19 +01:00
committed by Martin Basti
parent 394edf5f05
commit f6f5708a5a

View File

@@ -350,6 +350,17 @@ AC_MSG_RESULT([${IPAPLATFORM}])
dnl ---------------------------------------------------------------------------
dnl Version information from VERSION.m4 and command line
dnl ---------------------------------------------------------------------------
dnl Are we in source tree?
AM_CONDITIONAL([IS_GIT_SNAPSHOT], [test "IPA_VERSION_IS_GIT_SNAPSHOT" == "yes"])
AM_COND_IF([IS_GIT_SNAPSHOT], [
AC_MSG_CHECKING([if source directory is a Git reposistory])
if test ! -d "${srcdir}/.git"; then
AC_MSG_ERROR([Git reposistory is required by VERSION.m4 IPA_VERSION_IS_GIT_SNAPSHOT but not found])
else
AC_MSG_RESULT([yes])
fi
])
AC_ARG_WITH([vendor-suffix],
AS_HELP_STRING([--with-vendor-suffix=STRING],
[Vendor string used by package system, e.g. "-1.fc24"]),