From 290f953253afc5935382525cd4b72e091865cab5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 17 Apr 2018 18:19:50 +0200 Subject: [PATCH] configure: centralize shell-quoting of tests' .literal_args field this de-noises the code somewhat, and makes it possible to eval() the code generated by $$qtConfLibraryArgs(), which we want to do later. Change-Id: Ib6101c6745101801e34f8fab1ad6651e624130c7 Reviewed-by: Joerg Bornemann --- configure.pri | 2 +- mkspecs/features/qt_configure.prf | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.pri b/configure.pri index 0512ef0144..f75c6c211a 100644 --- a/configure.pri +++ b/configure.pri @@ -408,7 +408,7 @@ defineTest(qtConfTest_x86SimdAlways) { qtConfCheckFeature($$f) equals($${fpfx}.$${f}.available, true): configs += $$f } - $${1}.literal_args = $$system_quote(SIMD=$$join(configs, " ")) + $${1}.literal_args = SIMD=$$join(configs, " ") qtConfTest_compile($${1}) } diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 70c763a2c3..69a2fa14f1 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -627,15 +627,15 @@ defineReplace(qtConfLibraryArgs) { qmake_args = libs = $$eval($${1}.libs) !isEmpty(libs): \ - qmake_args += $$system_quote(LIBS += $$libs) + qmake_args += "LIBS += $$libs" for (b, $${1}.builds._KEYS_): \ - qmake_args += $$system_quote(LIBS_$$upper($$b) += $$eval($${1}.builds.$${b})) + qmake_args += "LIBS_$$upper($$b) += $$eval($${1}.builds.$${b})" includedir = $$eval($${1}.includedir) !isEmpty(includedir): \ - qmake_args += $$system_quote(INCLUDEPATH *= $$includedir) + qmake_args += "INCLUDEPATH *= $$includedir" cflags = $$eval($${1}.cflags) !isEmpty(cflags): \ - qmake_args += $$system_quote(QMAKE_CFLAGS += $$cflags) $$system_quote(QMAKE_CXXFLAGS += $$cflags) + qmake_args += "QMAKE_CFLAGS += $$cflags" "QMAKE_CXXFLAGS += $$cflags" return($$qmake_args) } @@ -992,7 +992,9 @@ defineTest(qtConfTest_compile) { write_file($$test_base_out_dir/.qmake.cache)|error() # add possible command line args - qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args) + qmake_args += \ + $$qtConfPrepareArgs($$eval($${1}.args)) \ + $$qtSystemQuote($$eval($${1}.literal_args)) qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") { qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \