autogen.sh, setver.sh: fix build from screwed git repo
A run of autogen.sh script is required when we are building vzctl
from git. Note that autogen.sh runs setver.sh in order to figure
out vzctl version from git and set it, so it would be clear later
that we are running a version from git.
In the case of broken or absent git repo though, setver.sh can't
get version from git and errorneously sets an empty version in both
configure.ac and vzctl.spec, rendering them both invalid.
So, let's add a check to setver.sh to make sure we got a version
from git, otherwise abort with an appropriate message.
Also, let's modify autogen.sh to run autoconf before setver.sh because
setver.sh might fail. If it is not failing, though, let's run autoconf
again to regenerate configure since we have just changed version in
configure.ac
While at it, don't clear autom4te.cache since it might speed up
subsequent autoconf invocations.
Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2 files changed