summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2014-11-27 14:12:40 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-17 18:28:00 +0000
commitb6f0060f60a5ce3367164c6450f1a6154baebac1 (patch)
tree45c6218a66cb0260251eaf9b684730fbfe9c8bd0
parent7e71eec3c82697cd3799fb58a4bb9fc4a8bc6d6e (diff)
downloadqtbase-b6f0060f60a5ce3367164c6450f1a6154baebac1.tar.gz
support spaces in build and install dirs
spaces in the source dir are not supported for now, as that requires some more profound refactoring of the bootstrap makefiles. Change-Id: Ie0c07a1558b8326f642f2ea144bc1cd85ee761af Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rwxr-xr-xbin/syncqt.pl1
-rwxr-xr-xconfig.tests/unix/arch.test6
-rwxr-xr-xconfig.tests/unix/compile.test10
-rwxr-xr-xconfigure2
-rw-r--r--configure.bat2
-rw-r--r--mkspecs/features/qt_config.prf16
-rw-r--r--mkspecs/features/qt_module_headers.prf2
-rw-r--r--mkspecs/features/qt_module_pris.prf29
-rw-r--r--mkspecs/features/testlib_defines.prf2
9 files changed, 39 insertions, 31 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 4462cebe4e..1b9b197173 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -379,6 +379,7 @@ sub fixPaths {
my $out = File::Spec->abs2rel(cleanupPath($file), cleanupPath($dir));
$out =~ s,\\,/,g;
+ $out = "\"$out\"" if ($out =~ / /);
return $out;
}
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test
index 56d71e6066..c50bd8b30a 100755
--- a/config.tests/unix/arch.test
+++ b/config.tests/unix/arch.test
@@ -23,14 +23,14 @@ while [ "$#" -gt 0 ]; do
PARAM=$1
case $PARAM in
-L*|-l*)
- LFLAGS="$LFLAGS $PARAM"
+ LFLAGS="$LFLAGS \"$PARAM\""
;;
-I*)
INC=`echo $PARAM | sed -e 's/^-I//'`
- INCLUDEPATH="$INCLUDEPATH $INC"
+ INCLUDEPATH="$INCLUDEPATH \"$INC\""
;;
-D*)
- CXXFLAGS="$CXXFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS \"$PARAM\""
;;
*) ;;
esac
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index 67325f2c20..103321e451 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -33,18 +33,18 @@ while [ "$#" -gt 0 ]; do
shift
;;
-F*|-m*|-x*)
- LFLAGS="$LFLAGS $PARAM"
- CXXFLAGS="$CXXFLAGS $PARAM"
+ LFLAGS="$LFLAGS \"$PARAM\""
+ CXXFLAGS="$CXXFLAGS \"$PARAM\""
;;
-L*|-l*|-pthread)
- LFLAGS="$LFLAGS $PARAM"
+ LFLAGS="$LFLAGS \"$PARAM\""
;;
-I*)
INC=`echo $PARAM | sed -e 's/^-I//'`
- INCLUDEPATH="$INCLUDEPATH $INC"
+ INCLUDEPATH="$INCLUDEPATH \"$INC\""
;;
-f*|-D*)
- CXXFLAGS="$CXXFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS \"$PARAM\""
;;
-Qoption)
# Two-argument form for the Sun Compiler
diff --git a/configure b/configure
index 973d18fe6a..b83ca24369 100755
--- a/configure
+++ b/configure
@@ -4047,7 +4047,7 @@ fi
#-------------------------------------------------------------------------------
# Verify makespec
#-------------------------------------------------------------------------------
-QMAKE_OUTPUT=`$outpath/bin/qmake -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
+QMAKE_OUTPUT=`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
if [ $? != "0" ]; then
echo "Failed to process makespec for platform '$XPLATFORM'"
if [ "$OPT_VERBOSE" = "yes" ]; then
diff --git a/configure.bat b/configure.bat
index 6852ec7146..0f0638b3db 100644
--- a/configure.bat
+++ b/configure.bat
@@ -47,7 +47,7 @@ if not exist mkspecs (
md mkspecs
if errorlevel 1 goto exit
)
-perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir %QTDIR% %QTSRC%
+perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir "%QTDIR%" %QTSRC%
if errorlevel 1 goto exit
if not exist tools\configure (
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 208681d98a..973a2182c9 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -5,16 +5,21 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
debug(1, "Cannot load qconfig.pri!")
} else {
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")
- QMAKE_MODULE_PATH = $$split($$list($$(QMAKEMODULES)), $$DIRLIST_SEPARATOR)
+ dirs = $$(QMAKEMODULES)
+ QMAKE_MODULE_PATH = $$split(dirs, $$DIRLIST_SEPARATOR)
QMAKE_MODULE_PATH += $$QMAKEMODULES
- QMAKE_MODULE_PATH += $$split($$list($$[QMAKEMODULES]), $$DIRLIST_SEPARATOR)
- QMAKE_MODULE_PATH += $$replace($$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR)), \
- \$, /modules)
+ dirs = $$[QMAKEMODULES]
+ QMAKE_MODULE_PATH += $$split(dirs, $$DIRLIST_SEPARATOR)
+ dirs = $$[QMAKE_MKSPECS]
+ dirs = $$split(dirs, $$DIRLIST_SEPARATOR)
+ QMAKE_MODULE_PATH += $$replace(dirs, \$, /modules)
+ unset(dirs)
QMAKE_MODULE_PATH = $$unique(QMAKE_MODULE_PATH)
QMAKE_MODULE_PATH = $$reverse(QMAKE_MODULE_PATH)
for(dir, QMAKE_MODULE_PATH) {
debug(1, "Loading modules from $${dir}")
- for(mod, $$list($$files($$dir/qt_*.pri))) {
+ mods = $$files($$dir/qt_*.pri)
+ for (mod, mods) {
# For installed Qt these paths will be common for all modules.
# For uninstalled prefix builds these will vary per module, via the
# forwarding module pri files. Keep qt_module_pris.prf in sync with this!
@@ -28,6 +33,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
include($$mod)
}
+ unset(mods)
}
QT_MODULES = $$unique(QT_MODULES) # In case modules appear in multiple places
unset(QT_MODULE_INCLUDE_BASE)
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
index 5015d58861..fc3ec75e82 100644
--- a/mkspecs/features/qt_module_headers.prf
+++ b/mkspecs/features/qt_module_headers.prf
@@ -21,7 +21,7 @@ load(qt_build_paths)
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
}
QMAKE_SYNCQT += \
- -outdir $$MODULE_BASE_OUTDIR $$MODULE_SYNCQT_DIR
+ -outdir $$system_quote($$MODULE_BASE_OUTDIR) $$MODULE_SYNCQT_DIR
!silent: message($$QMAKE_SYNCQT)
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
}
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index 74517a3fde..fd639b10ad 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -48,9 +48,10 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
module_libs = "\$\$QT_MODULE_LIB_BASE"
unix:!static {
host_build: \
- module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_HOST_LIBS]"
+ module_rpath = $$[QT_HOST_LIBS]
else: \
- module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_INSTALL_LIBS/dev]"
+ module_rpath = $$[QT_INSTALL_LIBS/dev]
+ module_rpath = "QT.$${MODULE_ID}.rpath = $$val_escape(module_rpath)"
} else {
module_rpath =
}
@@ -93,7 +94,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
internal_module: \
MODULE_INCLUDES += $$MODULE_PRIVATE_INCLUDES
split_incpath: \
- MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$MODULE_SHADOW_INCLUDES"
+ MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$val_escape(MODULE_SHADOW_INCLUDES)"
MODULE_PRI_CONT = \
"QT.$${MODULE_ID}.VERSION = $${VERSION}" \
"QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
@@ -117,7 +118,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
$$module_rundep \
"QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
$$module_config \
- "QT.$${MODULE_ID}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
+ "QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \
"" \
"QT_MODULES += $$MODULE"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
@@ -147,18 +148,18 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
# Create a forwarding module .pri file
MODULE_FWD_PRI_CONT = \
- "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
- "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_INCDIR/include" \
- "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
- "QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
- "QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
- "QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
- "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
- "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
- "include($$MODULE_PRI)" \
+ "QT_MODULE_BIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/bin" \
+ "QT_MODULE_INCLUDE_BASE = $$val_escape(MODULE_BASE_INCDIR)/include" \
+ "QT_MODULE_IMPORT_BASE = $$val_escape(MODULE_BASE_OUTDIR)/imports" \
+ "QT_MODULE_QML_BASE = $$val_escape(MODULE_BASE_OUTDIR)/qml" \
+ "QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
+ "QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \
+ "QT_MODULE_LIBEXEC_BASE = $$val_escape(MODULE_BASE_OUTDIR)/libexec" \
+ "QT_MODULE_PLUGIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/plugins" \
+ "include($$val_escape(MODULE_PRI))" \
"QT.$${MODULE_ID}.priority = 1"
!internal_module: MODULE_FWD_PRI_CONT += \
- "include($$MODULE_PRIVATE_PRI)" \
+ "include($$val_escape(MODULE_PRIVATE_PRI))" \
"QT.$${MODULE}_private.priority = 1"
MODULE_FWD_PRI_CONT += $$MODULE_FWD_PRI_CONT_SUFFIX
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
diff --git a/mkspecs/features/testlib_defines.prf b/mkspecs/features/testlib_defines.prf
index 59540689d3..9176beb9dd 100644
--- a/mkspecs/features/testlib_defines.prf
+++ b/mkspecs/features/testlib_defines.prf
@@ -1 +1 @@
-DEFINES += QT_TESTCASE_BUILDDIR=\\\"$$OUT_PWD\\\"
+DEFINES += QT_TESTCASE_BUILDDIR=$$shell_quote(\"$$OUT_PWD\")