Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
autogen.sh | 53 +++++++++++++++--------------------------------------
1 file changed, 15 insertions(+), 38 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 47446dc785..f20a61ed29 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -20,21 +20,11 @@ test -f src/libvirt.c || {
die "$0 must live in the top-level libvirt directory"
}
-dry_run=
no_git=
gnulib_srcdir=
extra_args=
while test "$#" -gt 0; do
case "$1" in
- --dry-run)
- # This variable will serve both as an indicator of the fact that
- # a dry run has been requested, and to store the result of the
- # dry run. It will be ultimately used as return code for the
- # script: 0 means no action is necessary, 2 means that autogen.sh
- # needs to be executed, and 1 is reserved for failures
- dry_run=0
- shift
- ;;
--no-git)
no_git=" $1"
shift
@@ -105,12 +95,10 @@ if test -d .git || test -f .git; then
done
fi
if test "$CLEAN_SUBMODULE" && test -z "$no_git"; then
- if test -z "$dry_run"; then
- echo "Cleaning up submodules..."
- git submodule foreach 'git clean -dfqx && git reset --hard'
|| {
- die "Cleaning up submodules failed"
- }
- fi
+ echo "Cleaning up submodules..."
+ git submodule foreach 'git clean -dfqx && git reset --hard' || {
+ die "Cleaning up submodules failed"
+ }
fi
# Update all submodules. If any of the submodules has not been
@@ -130,34 +118,23 @@ if test -d .git || test -f .git; then
if test "$actual_hash" = "$expected_hash"; then
# The gnulib hash matches our expectations, and all the files
# that can only be generated through bootstrap are present:
- # we just need to run autoreconf. Unless we're performing a
- # dry run, of course...
- if test -z "$dry_run"; then
- echo "Running autoreconf..."
- autoreconf -v || {
- die "autoreconf failed"
- }
- fi
+ # we just need to run autoreconf.
+ echo "Running autoreconf..."
+ autoreconf -v || {
+ die "autoreconf failed"
+ }
else
# Whenever the gnulib submodule or any of the related bits
# has been changed in some way (see gnulib_hash) we need to
- # run bootstrap again. If we're performing a dry run, we
- # change the return code instead to signal our caller
- if test "$dry_run"; then
- dry_run=2
- else
- echo "Running bootstrap..."
- ./bootstrap$no_git || {
- die "bootstrap failed"
- }
- gnulib_hash >"$state_file"
- fi
+ # run bootstrap again.
+ echo "Running bootstrap..."
+ ./bootstrap$no_git || {
+ die "bootstrap failed"
+ }
+ gnulib_hash >"$state_file"
fi
fi
-# When performing a dry run, we can stop here
-test "$dry_run" && exit "$dry_run"
-
# If asked not to run configure, we can stop here
test "$NOCONFIGURE" && exit 0
--
2.24.1