mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
do not require two ./autogen.sh runs to permit "make"
* autogen.sh (bootstrap_hash): New function. Running bootstrap may update the gnulib SHA1, yet we were computing t=$(git submodule status ...) *prior* to running bootstrap, and then recording that sometimes-stale value in the stamp file upon a successful bootstrap run. That would require two (lengthy!) bootstrap runs to update the stamp file.
This commit is contained in:
parent
fe2f1ba1db
commit
be7780b035
21
autogen.sh
21
autogen.sh
@ -62,20 +62,27 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Compute the hash we'll use to determine whether rerunning bootstrap
|
||||||
|
# is required. The first is just the SHA1 that selects a gnulib snapshot.
|
||||||
|
# The second ensures that whenever we change the set of gnulib modules used
|
||||||
|
# by this package, we rerun bootstrap to pull in the matching set of files.
|
||||||
|
bootstrap_hash()
|
||||||
|
{
|
||||||
|
git submodule status | sed 's/^[ +-]//;s/ .*//'
|
||||||
|
git hash-object bootstrap.conf
|
||||||
|
}
|
||||||
|
|
||||||
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
# Ensure that whenever we pull in a gnulib update or otherwise change to a
|
||||||
# different version (i.e., when switching branches), we also rerun ./bootstrap.
|
# different version (i.e., when switching branches), we also rerun ./bootstrap.
|
||||||
curr_status=.git-module-status
|
curr_status=.git-module-status
|
||||||
t=$(git submodule status|sed 's/^[ +-]//;s/ .*//'; \
|
t=$(bootstrap_hash)
|
||||||
git hash-object bootstrap.conf)
|
|
||||||
if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
|
if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
|
||||||
: # good, it's up to date, all we need is autoreconf
|
: # good, it's up to date, all we need is autoreconf
|
||||||
autoreconf -if
|
autoreconf -if
|
||||||
else
|
else
|
||||||
echo running bootstrap...
|
echo running bootstrap...
|
||||||
./bootstrap && echo "$t" > $curr_status || {
|
./bootstrap && bootstrap_hash > $curr_status \
|
||||||
echo "Failed to bootstrap gnulib, please investigate."
|
|| { echo "Failed to bootstrap gnulib, please investigate."; exit 1; }
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$THEDIR"
|
cd "$THEDIR"
|
||||||
|
Loading…
Reference in New Issue
Block a user