On 02/04/2015 05:49 AM, Stefan Zimmermann wrote:
If you will build libvirt with the no-git-option than you is the
gnulib-srcdir mandatory. You will lose this information till now. With
this patch you will save this inforamtion.
s/inforamtion/information/
Reads awkwardly. Better would be:
maint: improve usage of autogen's --no-git
autogen.sh supports a --no-git mode that avoids the need to use git; but
to date, it only worked if GNULIB_SRCDIR is set in the environment.
However, the bootstrap script also works if it is passed a
--gnulib-srcdir command line argument; add support for that in autogen.sh.
Signed-off-by: Stefan Zimmermann <stzi(a)linux.vnet.ibm.com>
---
autogen.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
NACK.
diff --git a/autogen.sh b/autogen.sh
index 1965f64..0168d24 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,8 +18,8 @@ test -f src/libvirt.c || {
EXTRA_ARGS=
no_git=
if test "x$1" = "x--no-git"; then
- no_git=" $1"
- shift
+ no_git=" $1 $2"
This assumes that the caller supplies --gnulib-srcdir as the second
argument, immediately after --no-git. But this is not required; in
fact, it is possible to set GNULIB_SRCDIR in the environment and not
even pass --gnulib-srcdir on the command line. Also, 'shift 2' is not
portable to older /bin/sh.
A better fix would be appending to $no_git only after checking if the
next argument(s) after --no-git really specify a gnulib srcdir.
But the idea of your patch makes sense. Would you like to try your hand
at v2? Maybe something like:
no_git=
if test "x$1" = "x--no-git"; then
no_git=" $1"
shift
case "$1 $2" in
--gnulib-srcdir=*) no_git="$no_git $1"; shift ;;
--gnulib-srcdir *) no_git="$no_git $1 $2"; shift; shift ;;
esac
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org