aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDinah Baum <dinahbaum123@gmail.com>2023-02-21 06:06:30 -0500
committerThomas Huth <thuth@redhat.com>2023-02-27 09:15:39 +0100
commitf160a5b25b33b69b089815cfd435aa3199497984 (patch)
tree831b490b003305502720f3992eb3b795fd20f047 /configure
parentc8db90b86d0849b59452b8cac5b477bb65dcb6a1 (diff)
downloadqemu-f160a5b25b33b69b089815cfd435aa3199497984.zip
qemu-f160a5b25b33b69b089815cfd435aa3199497984.tar.gz
qemu-f160a5b25b33b69b089815cfd435aa3199497984.tar.bz2
configure: Add 'mkdir build' check
QEMU configure script goes into an infinite error printing loop when in read only directory due to 'build' dir never being created. Checking if 'mkdir dir' succeeds prevents this error. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Dinah Baum <dinahbaum123@gmail.com> Message-Id: <20230221110631.4142-1-dinahbaum123@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> [thuth: Remove second "touch $MARKER"] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index cf6db3d..dccb5d4 100755
--- a/configure
+++ b/configure
@@ -31,8 +31,12 @@ then
fi
fi
- mkdir build
- touch $MARKER
+ if ! mkdir build || ! touch $MARKER
+ then
+ echo "ERROR: Could not create ./build directory. Check the permissions on"
+ echo "your source directory, or try doing an out-of-tree build."
+ exit 1
+ fi
cat > GNUmakefile <<'EOF'
# This file is auto-generated by configure to support in-source tree