summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xconfigure5
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cfb18f1525..c62594445d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
# Makefile for QEMU.
+ifneq ($(words $(subst :, ,$(CURDIR))), 1)
+ $(error main directory cannot contain spaces nor colons)
+endif
+
# Always point to the root of the build tree (needs GNU make).
BUILD_DIR=$(CURDIR)
diff --git a/configure b/configure
index b6962d1381..cf3d9d30bf 100755
--- a/configure
+++ b/configure
@@ -279,6 +279,11 @@ ld_has() {
# make source path absolute
source_path=$(cd "$(dirname -- "$0")"; pwd)
+if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
+then
+ error_exit "main directory cannot contain spaces nor colons"
+fi
+
# default parameters
cpu=""
iasl="iasl"