From e23471abc0ced787fcae5adec99b5358919d916c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 15 Jul 2016 15:57:43 +0200 Subject: [PATCH] fix quoting in the basic qmake command construction ... and refactor it to make it less scary. note that "qmake_args" now basically means "qmake + args". Change-Id: Ifa5b756642de95e2aadf01606d936ea1d7a18210 Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index b2d1817d16..711eec8a2c 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -394,8 +394,12 @@ defineTest(qtConfTest_compile) { test_dir = $$test_dir/$$eval($${1}.pro) test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&" + qmake_args = $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE)) + !isEmpty(QMAKE_QTCONF): \ + qmake_args += -qtconf $$system_quote($$QMAKE_QTCONF) + # Disable qmake features which are typically counterproductive for tests - qmake_args = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\"" + qmake_args += "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\"" # allow tests to behave differently depending on the type of library # being built (shared/static). e.g. see config.tests/unix/icu @@ -445,12 +449,10 @@ defineTest(qtConfTest_compile) { mkpath($$test_out_dir)|error() - !isEmpty(QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF - # add possible command line args qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) - qtRunLoggedCommand("$$test_cmd_base $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE)) $$qtconfarg $$qmake_args $$shell_quote($$test_dir)") { + qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") { qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \ return(true) }