Skip to content

Commit

Permalink
configure: Add 'mkdir build' check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dinah Baum <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
[thuth: Remove second "touch $MARKER"]
Signed-off-by: Thomas Huth <[email protected]>
  • Loading branch information
DBaum1 authored and huth committed Feb 27, 2023
1 parent c8db90b commit f160a5b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f160a5b

Please sign in to comment.