Title: [121965] trunk
Revision
121965
Author
[email protected]
Date
2012-07-06 06:18:47 -0700 (Fri, 06 Jul 2012)

Log Message

[Qt] Remove custom qmake logic for module creation

Qmake now has the necessary hooks to cleanly override the build locations.

https://bugs.webkit.org/show_bug.cgi?id=90461

Patch by Oswald Buddenhagen <[email protected]> on 2012-07-06
Reviewed by Tor Arne Vestbø.

.:

* Source/api.pri:

Tools:

* qmake/mkspecs/features/default_pre.prf:

Modified Paths

Diff

Modified: trunk/ChangeLog (121964 => 121965)


--- trunk/ChangeLog	2012-07-06 13:17:36 UTC (rev 121964)
+++ trunk/ChangeLog	2012-07-06 13:18:47 UTC (rev 121965)
@@ -1,5 +1,17 @@
 2012-07-06  Oswald Buddenhagen  <[email protected]>
 
+        [Qt] Remove custom qmake logic for module creation
+
+        Qmake now has the necessary hooks to cleanly override the build locations.
+
+        https://bugs.webkit.org/show_bug.cgi?id=90461
+
+        Reviewed by Tor Arne Vestbø.
+
+        * Source/api.pri:
+
+2012-07-06  Oswald Buddenhagen  <[email protected]>
+
         [Qt] Add top-level .qmake.conf
 
         With Qt5, this makes setting $QMAKEPATH externally unnecessary.

Modified: trunk/Source/api.pri (121964 => 121965)


--- trunk/Source/api.pri	2012-07-06 13:17:36 UTC (rev 121964)
+++ trunk/Source/api.pri	2012-07-06 13:18:47 UTC (rev 121965)
@@ -15,6 +15,17 @@
     MODULE = webkit
     MODULE_PRI = ../Tools/qmake/qt_webkit.pri
 
+    # ---------------- Custom developer-build handling -------------------
+    #
+    # The assumption for Qt developer builds is that the module file
+    # will be put into qtbase/mkspecs/modules, and the libraries into
+    # qtbase/lib, with rpath/install_name set to the Qt lib dir.
+    #
+    # For WebKit we don't want that behavior for the libraries, as we want
+    # them to be self-contained in the WebKit build dir.
+    #
+    CONFIG += force_independent
+
     BASE_TARGET = $$TARGET
 
     load(qt_module_config)
@@ -30,65 +41,6 @@
     # Allow doing a debug-only build of WebKit (not supported by Qt)
     macx:!debug_and_release:debug: TARGET = $$BASE_TARGET
 
-    # ---------------- Custom developer-build handling -------------------
-    #
-    # The assumption for Qt developer builds is that the module file
-    # will be put into qtbase/mkspecs/modules, and the libraries into
-    # qtbase/lib, with rpath/install_name set to the Qt lib dir.
-    #
-    # For WebKit we don't want that behavior for the libraries, as we want
-    # them to be self-contained in the WebKit build dir. To achive that we
-    # trick Qt into thinking it's not a developer build, but setting QTDIR
-    # to a bogus path in default_pre.prf.
-    #
-    # We still want the module file to live in the Qt dir so the module can
-    # be used by setting QT += webkit, so we copy the file manually. We also
-    # have to make sure the rpath/install_name of the libraries are relative
-    # to the webkit build dir.
-
-    !build_pass {
-        # Make a more accessible copy of the module forward file
-        # in the WebKit build directory.
-        convenience_module_path = $$toSystemPath($${ROOT_BUILD_DIR})$${QMAKE_DIR_SEP}modules
-        module_filename = $$basename(QT.webkit.module_pri)
-
-        # The QMAKE_EXTRA_MODULE_FORWARDS might contain more than one path,
-        # so we iterate the paths and find one that matches our build dir.
-        for(module_forward, QMAKE_EXTRA_MODULE_FORWARDS) {
-            in_build_dir = $$find(module_forward, ^$${ROOT_BUILD_DIR})
-            !isEmpty(in_build_dir) {
-                webkit_module_forward = $$module_forward
-                break()
-            }
-        }
-
-        isEmpty(webkit_module_forward) {
-            warning(Could not resolve QMAKE_EXTRA_MODULE_FORWARDS path!)
-        } else {
-            make_module_fwd_convenience.target = $$convenience_module_path$${QMAKE_DIR_SEP}$$module_filename
-            make_module_fwd_convenience.commands = $$QMAKE_MKDIR $$convenience_module_path \
-                && echo \"include($$webkit_module_forward$${QMAKE_DIR_SEP}$$module_filename)\" > $$convenience_module_path$${QMAKE_DIR_SEP}$$module_filename
-            make_module_fwd_convenience.depends = $$webkit_module_forward$${QMAKE_DIR_SEP}$$module_filename
-
-            QMAKE_EXTRA_TARGETS += make_module_fwd_convenience
-            DEFAULT_TARGETS += make_module_fwd_convenience
-        }
-
-        qt_developer_build {
-            # Copy the module forward file into Qt so that the module
-            # is immediately accessible.
-            qt_modules_path = $$[QT_INSTALL_PREFIX]$${QMAKE_DIR_SEP}mkspecs$${QMAKE_DIR_SEP}modules
-
-            copy_module_fwd_file.target = $$qt_modules_path$${QMAKE_DIR_SEP}$$module_filename
-            copy_module_fwd_file.commands = $$QMAKE_COPY  $$toSystemPath($$QMAKE_EXTRA_MODULE_FORWARDS)$${QMAKE_DIR_SEP}$$module_filename $$qt_modules_path
-            # FIXME: Add dependendy that ensures we copy the forward file if the target is updated
-            copy_module_fwd_file.depends = $$QMAKE_EXTRA_MODULE_FORWARDS$${QMAKE_DIR_SEP}$$module_filename
-
-            QMAKE_EXTRA_TARGETS += copy_module_fwd_file
-            DEFAULT_TARGETS += copy_module_fwd_file
-        }
-    }
-
     # Make sure the install_name of the QtWebKit library point to webkit
     macx {
         # We do our own absolute path so that we can trick qmake into

Modified: trunk/Tools/ChangeLog (121964 => 121965)


--- trunk/Tools/ChangeLog	2012-07-06 13:17:36 UTC (rev 121964)
+++ trunk/Tools/ChangeLog	2012-07-06 13:18:47 UTC (rev 121965)
@@ -1,5 +1,17 @@
 2012-07-06  Oswald Buddenhagen  <[email protected]>
 
+        [Qt] Remove custom qmake logic for module creation
+
+        Qmake now has the necessary hooks to cleanly override the build locations.
+
+        https://bugs.webkit.org/show_bug.cgi?id=90461
+
+        Reviewed by Tor Arne Vestbø.
+
+        * qmake/mkspecs/features/default_pre.prf:
+
+2012-07-06  Oswald Buddenhagen  <[email protected]>
+
         [Qt] Add top-level .qmake.conf
 
         With Qt5, this makes setting $QMAKEPATH externally unnecessary.

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (121964 => 121965)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-07-06 13:17:36 UTC (rev 121964)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-07-06 13:18:47 UTC (rev 121965)
@@ -31,18 +31,15 @@
 pro_file_name = $$basename(_PRO_FILE_)
 equals(pro_file_name, configure.pro): CONFIG += configure_pass
 
-# We want the QtWebKit API forwarding includes to live in the root build dir,
-# except when we are running the config.tests in Tools/qmake.
-!configure_pass: QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR
+# We want the QtWebKit API forwarding includes to live in the root build dir.
+MODULE_BASE_DIR = $$ROOT_WEBKIT_DIR
+MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
 
-# Load Qt's defaults after we've resolved the build directory. This will also
-# run syncqt if there is a sync.profile in the $$_PRO_FILE_PWD_. We never want
-# to enable Qt's concept of a developer-build, since we take care of installing
-# our own module file. See api.pri for details about how we utilize this.
-old_qtdir=$$QTDIR
-QTDIR=no-developer-build-please
+# The qmake files on the other hand live in a subdirectory.
+MODULE_QMAKE_OUTDIR = $$ROOT_BUILD_DIR/Tools/qmake
+
+# Now we're ready to load default_pre from Qt
 load(default_pre)
-QTDIR=$$old_qtdir
 
 unix:config_gccdepends {
     # We have a compiler that supports the -MD option (and neither
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to