configure: Fix BUILDID (again)
The previous commit made BUILDID use git for submodule, but for complex git setup (e.g. worktree) and older git version or dead .git 'link' it would blindly rely on the existence of the .git file even if git does not actually find anything. This would lead to possibly empty BUILDID which would fail building. Just always run the git command, and echo the version string if it failed Change-Id: Ied268d2150a30dc1146498e15fa8394afc8a8d0d
This commit is contained in:
2
configure
vendored
2
configure
vendored
@ -4886,7 +4886,7 @@ _ACEOF
|
|||||||
|
|
||||||
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
||||||
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
||||||
BUILDID=$( cd $IHK_ABS_SRCDIR; if [ ! -e .git ]; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
|
BUILDID=$( git --git-dir=$IHK_ABS_SRCDIR/.git rev-parse --short HEAD 2>/dev/null || echo $IHK_VERSION )
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: BUILDID=$BUILDID" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: BUILDID=$BUILDID" >&5
|
||||||
$as_echo "$as_me: BUILDID=$BUILDID" >&6;}
|
$as_echo "$as_me: BUILDID=$BUILDID" >&6;}
|
||||||
if test "x$BUILDID" != "x" ; then
|
if test "x$BUILDID" != "x" ; then
|
||||||
|
|||||||
@ -544,7 +544,7 @@ AC_DEFINE_UNQUOTED(MCKERNEL_VERSION,"$MCKERNEL_VERSION",[McKernel version string
|
|||||||
|
|
||||||
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
||||||
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
||||||
BUILDID=$( cd $IHK_ABS_SRCDIR; if @<:@ ! -e .git @:>@; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
|
BUILDID=$( git --git-dir=$IHK_ABS_SRCDIR/.git rev-parse --short HEAD 2>/dev/null || echo $IHK_VERSION )
|
||||||
AC_MSG_NOTICE([BUILDID=$BUILDID])
|
AC_MSG_NOTICE([BUILDID=$BUILDID])
|
||||||
if test "x$BUILDID" != "x" ; then
|
if test "x$BUILDID" != "x" ; then
|
||||||
AC_DEFINE_UNQUOTED(BUILDID,"$BUILDID",[IHK build-id to confirm IHK and McKernel built at the same time are used])
|
AC_DEFINE_UNQUOTED(BUILDID,"$BUILDID",[IHK build-id to confirm IHK and McKernel built at the same time are used])
|
||||||
|
|||||||
2
ihk
2
ihk
Submodule ihk updated: a7a200fd3e...4a8e719fa0
Reference in New Issue
Block a user