diff --git a/qemu/Makefile b/qemu/Makefile index c286e520..5dcaa9bc 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -1,5 +1,9 @@ # Makefile for QEMU - modified for Unicorn engine. +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/qemu/configure b/qemu/configure index 0e8b74df..ebf6c1cf 100755 --- a/qemu/configure +++ b/qemu/configure @@ -133,8 +133,15 @@ path_of() { return 1 } +# 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 -source_path=$(dirname "$0") cpu="" static="no" cross_prefix=""