From 156e3981db60ce65f941867c0f951e9714e5eabf Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 30 Sep 2016 02:01:13 -0700 Subject: Reorder arguments to qmake self-invocation in xcodebuild.prf 26d44fce3dfb9dbd3b5be2a031fff8c1bb903960 added support for passing the configure options to qmake following a "--" argument. This interacted badly with xcodebuild.prf as the "args" variable would contain the standard qmake arguments AND the extra arguments following "--"... which were placed prior to -spec macx-xcode and the path of the .pro file, causing them to be ignored and thus qmake to print its usage when attempting to generate Xcode projects for Qt apps on UIKit platforms. Amends 6a9f38a11d56bb3ba6ec59955f3220627c0d30b6, which fixed the same issue inside qmake itself. Change-Id: I3056bd811c2ce958952fec8e05ddef7a063c0646 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/uikit/xcodebuild.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs/features/uikit') diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf index 82bcd9a315..c2090a31aa 100644 --- a/mkspecs/features/uikit/xcodebuild.prf +++ b/mkspecs/features/uikit/xcodebuild.prf @@ -21,7 +21,7 @@ args = for(arg, QMAKE_ARGS): \ args += $$system_quote($$arg) -cmd = "$$QMAKE_QMAKE $$args $$system_quote($$_PRO_FILE_) -spec macx-xcode" +cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args" debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'") system("cd $$system_quote($$OUT_PWD) && $$cmd") -- cgit v1.2.3 From 0059bf944db0e69fa82d4158468ab17ad4b8e8d0 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 3 Oct 2016 22:21:24 -0700 Subject: Don't add -spec XXX more than once to system command in xcodebuild.prf The "args" variable would contain the original -spec XXX flags in addition to the -spec macx-xcode passed in the system command invocation below. The last use of -spec takes effect, so this code was entirely ineffective. Consequently, uikit/default_post.prf in the nested qmake call thought it's still the top-level call and thus added xcodebuild again, which caused an infinite recursion. Change-Id: Ie98d8a7f3c1cd875f4a4146af9a66a66b48cc6cb Reviewed-by: Oswald Buddenhagen --- mkspecs/features/uikit/xcodebuild.prf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mkspecs/features/uikit') diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf index c2090a31aa..df015b583a 100644 --- a/mkspecs/features/uikit/xcodebuild.prf +++ b/mkspecs/features/uikit/xcodebuild.prf @@ -18,8 +18,12 @@ QMAKE_EXTRA_COMPILERS = error("Failed to create $$OUT_PWD") args = -for(arg, QMAKE_ARGS): \ - args += $$system_quote($$arg) +prev_arg = +for(arg, QMAKE_ARGS) { + !equals(arg, "-spec"):!equals(prev_arg, "-spec"): \ + args += $$system_quote($$arg) + prev_arg = $$arg +} cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args" debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'") -- cgit v1.2.3