[Qt] No need to save and restore TEMPLATE in a function
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 14:24:56 +0000 (14:24 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2012 14:24:56 +0000 (14:24 +0000)
This was a leftover from when the logic was not in its own function scope.

QMAKE_FRAMEWORK_BUNDLE_NAME on the other hand is exported in qtLibraryTarget, which
will surprisingly affect the global scope as well, so we have to save and restore it.

Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27

Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/functions.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121340 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/qmake/mkspecs/features/functions.prf

index a0b4be7..4c107b4 100644 (file)
@@ -1,3 +1,18 @@
+2012-06-27  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
+
+        [Qt] No need to save and restore TEMPLATE in a function
+
+        This was a leftover from when the logic was not in its own function scope.
+
+        QMAKE_FRAMEWORK_BUNDLE_NAME on the other hand is exported in qtLibraryTarget, which
+        will surprisingly affect the global scope as well, so we have to save and restore it.
+
+        Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27
+
+        Reviewed by Tor Arne Vestbø.
+
+        * qmake/mkspecs/features/functions.prf:
+
 2012-06-27  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
 
         [Qt] Fix lookup location for sqlite sources
index 527e0d8..f0e9d15 100644 (file)
@@ -234,13 +234,13 @@ defineTest(prependEach) {
 defineReplace(resolveFinalLibraryName) {
     !debug_and_release: return($$1)
 
-    original_template = $$TEMPLATE
     original_framework_name = $$QMAKE_FRAMEWORK_BUNDLE_NAME
 
     TEMPLATE = lib # So that qtLibraryTarget works
     target = $$qtLibraryTarget($$1)
 
-    TEMPLATE = $$original_template
+    # qtLibraryTarget will export QMAKE_FRAMEWORK_BUNDLE_NAME, which gets
+    # exported not only to this function scope, but to our call site.
     QMAKE_FRAMEWORK_BUNDLE_NAME = $$original_framework_name
     export(QMAKE_FRAMEWORK_BUNDLE_NAME)