Title: [128606] trunk
Revision
128606
Author
[email protected]
Date
2012-09-14 06:41:24 -0700 (Fri, 14 Sep 2012)

Log Message

[Qt] Fix handling of debug/release/debug_and_release/build_all

We now pick up the defaults from Qt, in default_pre (CONFIG already
contains the appropriate values for debug and release). We then let
the command line arguments to qmake, or the project files themselves,
override the configuration, and finally we sanitize the configuration
in default_post.

Reviewed by Simon Hausmann.

Modified Paths

Diff

Modified: trunk/ChangeLog (128605 => 128606)


--- trunk/ChangeLog	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/ChangeLog	2012-09-14 13:41:24 UTC (rev 128606)
@@ -1,3 +1,17 @@
+2012-09-14  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Fix handling of debug/release/debug_and_release/build_all
+
+        We now pick up the defaults from Qt, in default_pre (CONFIG already
+        contains the appropriate values for debug and release). We then let
+        the command line arguments to qmake, or the project files themselves,
+        override the configuration, and finally we sanitize the configuration
+        in default_post.
+
+        Reviewed by Simon Hausmann.
+
+        * Source/api.pri:
+
 2012-09-14  Keishi Hattori  <[email protected]>
 
         Add runtime flag that enables lang attribute for form controls in LayoutTests

Modified: trunk/Source/api.pri (128605 => 128606)


--- trunk/Source/api.pri	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Source/api.pri	2012-09-14 13:41:24 UTC (rev 128606)
@@ -51,14 +51,6 @@
 
 load(qt_module)
 
-# Make sure the module config doesn't override our preferred build config.
-debug_and_release:if(!debug|!release) {
-    # Removing debug_and_release causes issues with lib suffixes when building debug on Windows.
-    # Work around it by only removing build_all, and still create the Makefiles for both configurations.
-    win32*: CONFIG -= build_all
-    else: CONFIG -= debug_and_release
-}
-
 # Allow doing a debug-only build of WebKit (not supported by Qt)
 macx:!debug_and_release:debug: TARGET = $$BASE_TARGET
 

Modified: trunk/Tools/ChangeLog (128605 => 128606)


--- trunk/Tools/ChangeLog	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/ChangeLog	2012-09-14 13:41:24 UTC (rev 128606)
@@ -1,3 +1,22 @@
+2012-09-14  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Fix handling of debug/release/debug_and_release/build_all
+
+        We now pick up the defaults from Qt, in default_pre (CONFIG already
+        contains the appropriate values for debug and release). We then let
+        the command line arguments to qmake, or the project files themselves,
+        override the configuration, and finally we sanitize the configuration
+        in default_post.
+
+        Reviewed by Simon Hausmann.
+
+        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+        * Scripts/webkitdirs.pm:
+        (buildQMakeProjects):
+        * qmake/mkspecs/features/default_post.prf:
+        * qmake/mkspecs/features/default_pre.prf:
+        * qmake/mkspecs/features/mac/default_pre.prf:
+
 2012-09-14  Sudarsana Nagineni  <[email protected]>
 
         WebKitTestRunner needs layoutTestController.setTabKeyCyclesThroughElements

Modified: trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro (128605 => 128606)


--- trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro	2012-09-14 13:41:24 UTC (rev 128606)
@@ -50,8 +50,6 @@
     QMAKE_PLUGIN_BUNDLE_NAME = $$TARGET
     QMAKE_BUNDLE_LOCATION += "Contents/MacOS"
 
-    !build_pass:CONFIG += build_all
-
     OBJECTIVE_SOURCES += PluginObjectMac.mm
     LIBS += -framework Carbon -framework Cocoa -framework QuartzCore
 }

Modified: trunk/Tools/Scripts/webkitdirs.pm (128605 => 128606)


--- trunk/Tools/Scripts/webkitdirs.pm	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/Scripts/webkitdirs.pm	2012-09-14 13:41:24 UTC (rev 128606)
@@ -2267,7 +2267,6 @@
     } elsif ($passedConfig) {
         die "Build type $passedConfig is not supported with --qt.\n";
     }
-    push @buildArgs, "CONFIG-=debug_and_release" if ($passedConfig && isDarwin());
 
     # Using build-webkit to build assumes you want a developer-build
     push @buildArgs, "CONFIG-=production_build";

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (128605 => 128606)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-09-14 13:41:24 UTC (rev 128606)
@@ -12,6 +12,19 @@
 
 root_project_file: finalizeConfigure()
 
+# Sanitize build config for single-configuration builds
+!debug|!release {
+    # Removing debug_and_release causes issues with lib suffixes when building debug on Windows.
+    # Work around it by only removing build_all, and still create the Makefiles for both configurations.
+    win32*: CONFIG -= build_all
+    else: CONFIG -= debug_and_release
+} else:debug_and_release {
+    # Only build a single instance of each application
+    contains(TEMPLATE, app) {
+        CONFIG -= build_all
+    }
+}
+
 # Help keep the build tree clean
 MOC_DIR = moc
 RCC_DIR = rcc
@@ -153,9 +166,6 @@
     # Triggers the right export macro for the QtWebKit API (see qwebkitglobal.h)
     DEFINES += BUILDING_WEBKIT
 
-    # Build both debug and release configurations
-    mac: CONFIG += build_all
-
     # Prevent name clashes when building both debug and release. Qt5's module
     # system already takes care of this for the top level QtWebKit library.
     !qt_install_module:debug_and_release: TARGET = $$qtLibraryTarget($$TARGET)

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (128605 => 128606)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-09-14 13:41:24 UTC (rev 128606)
@@ -102,6 +102,12 @@
 # used by bots and developers, will disable it, to enable warnings etc.
 CONFIG += production_build
 
+# Pick up Qt's defaults for debug/release/debug_and_release
+if(win32|mac):!macx-xcode {
+    contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
+    contains(QT_CONFIG, build_all): CONFIG += build_all
+}
+
 # Try to locate sqlite3 source (for WebCore)
 SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
 isEmpty(SQLITE3SRCDIR) {

Modified: trunk/Tools/qmake/mkspecs/features/mac/default_pre.prf (128605 => 128606)


--- trunk/Tools/qmake/mkspecs/features/mac/default_pre.prf	2012-09-14 13:37:23 UTC (rev 128605)
+++ trunk/Tools/qmake/mkspecs/features/mac/default_pre.prf	2012-09-14 13:41:24 UTC (rev 128606)
@@ -5,7 +5,6 @@
 # -------------------------------------------------------------------
 
 CONFIG -= app_bundle
-CONFIG += debug_and_release
 
 load(default_pre)
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to