Use git(1) only if present
The GIT_REVISION is set as the result of 'git describe'. If git is not installed the old code generated an error: $ dh_autoreconf -a sh: 1: git: not found sh: 1: git: not found Thanks to Thomas Hood for the bug report https://groups.google.com/d/msg/nfc-tools-devel/Skd03b1wUcg/xnQThAPXPCYJ
This commit is contained in:
parent
c2fe7673dd
commit
4e89c61813
1 changed files with 4 additions and 3 deletions
|
@ -8,9 +8,10 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
# GIT revison
|
||||
define([git_revision], esyscmd([sh -c "git describe"]))
|
||||
GIT_REVISION=git_revision
|
||||
AC_DEFINE_UNQUOTED([GIT_REVISION], ["$GIT_REVISION"], [GIT revision])
|
||||
GIT_REVISION=`which git > /dev/null && git describe`
|
||||
if test x"$GIT_REVISION" != x""; then
|
||||
AC_DEFINE_UNQUOTED([GIT_REVISION], ["$GIT_REVISION"], [GIT revision])
|
||||
fi
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
|
|
Loading…
Reference in a new issue