Changeset 121965 in webkit


Ignore:
Timestamp:
Jul 6, 2012 6:18:47 AM (12 years ago)
Author:
Csaba Osztrogonác
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 <oswald.buddenhagen@nokia.com> on 2012-07-06
Reviewed by Tor Arne Vestbø.

.:

  • Source/api.pri:

Tools:

  • qmake/mkspecs/features/default_pre.prf:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r121964 r121965  
     12012-07-06  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
     2
     3        [Qt] Remove custom qmake logic for module creation
     4
     5        Qmake now has the necessary hooks to cleanly override the build locations.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=90461
     8
     9        Reviewed by Tor Arne Vestbø.
     10
     11        * Source/api.pri:
     12
    1132012-07-06  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
    214
  • trunk/Source/api.pri

    r121961 r121965  
    1616    MODULE_PRI = ../Tools/qmake/qt_webkit.pri
    1717
     18    # ---------------- Custom developer-build handling -------------------
     19    #
     20    # The assumption for Qt developer builds is that the module file
     21    # will be put into qtbase/mkspecs/modules, and the libraries into
     22    # qtbase/lib, with rpath/install_name set to the Qt lib dir.
     23    #
     24    # For WebKit we don't want that behavior for the libraries, as we want
     25    # them to be self-contained in the WebKit build dir.
     26    #
     27    CONFIG += force_independent
     28
    1829    BASE_TARGET = $$TARGET
    1930
     
    3041    # Allow doing a debug-only build of WebKit (not supported by Qt)
    3142    macx:!debug_and_release:debug: TARGET = $$BASE_TARGET
    32 
    33     # ---------------- Custom developer-build handling -------------------
    34     #
    35     # The assumption for Qt developer builds is that the module file
    36     # will be put into qtbase/mkspecs/modules, and the libraries into
    37     # qtbase/lib, with rpath/install_name set to the Qt lib dir.
    38     #
    39     # For WebKit we don't want that behavior for the libraries, as we want
    40     # them to be self-contained in the WebKit build dir. To achive that we
    41     # trick Qt into thinking it's not a developer build, but setting QTDIR
    42     # to a bogus path in default_pre.prf.
    43     #
    44     # We still want the module file to live in the Qt dir so the module can
    45     # be used by setting QT += webkit, so we copy the file manually. We also
    46     # have to make sure the rpath/install_name of the libraries are relative
    47     # to the webkit build dir.
    48 
    49     !build_pass {
    50         # Make a more accessible copy of the module forward file
    51         # in the WebKit build directory.
    52         convenience_module_path = $$toSystemPath($${ROOT_BUILD_DIR})$${QMAKE_DIR_SEP}modules
    53         module_filename = $$basename(QT.webkit.module_pri)
    54 
    55         # The QMAKE_EXTRA_MODULE_FORWARDS might contain more than one path,
    56         # so we iterate the paths and find one that matches our build dir.
    57         for(module_forward, QMAKE_EXTRA_MODULE_FORWARDS) {
    58             in_build_dir = $$find(module_forward, ^$${ROOT_BUILD_DIR})
    59             !isEmpty(in_build_dir) {
    60                 webkit_module_forward = $$module_forward
    61                 break()
    62             }
    63         }
    64 
    65         isEmpty(webkit_module_forward) {
    66             warning(Could not resolve QMAKE_EXTRA_MODULE_FORWARDS path!)
    67         } else {
    68             make_module_fwd_convenience.target = $$convenience_module_path$${QMAKE_DIR_SEP}$$module_filename
    69             make_module_fwd_convenience.commands = $$QMAKE_MKDIR $$convenience_module_path \
    70                 && echo \"include($$webkit_module_forward$${QMAKE_DIR_SEP}$$module_filename)\" > $$convenience_module_path$${QMAKE_DIR_SEP}$$module_filename
    71             make_module_fwd_convenience.depends = $$webkit_module_forward$${QMAKE_DIR_SEP}$$module_filename
    72 
    73             QMAKE_EXTRA_TARGETS += make_module_fwd_convenience
    74             DEFAULT_TARGETS += make_module_fwd_convenience
    75         }
    76 
    77         qt_developer_build {
    78             # Copy the module forward file into Qt so that the module
    79             # is immediately accessible.
    80             qt_modules_path = $$[QT_INSTALL_PREFIX]$${QMAKE_DIR_SEP}mkspecs$${QMAKE_DIR_SEP}modules
    81 
    82             copy_module_fwd_file.target = $$qt_modules_path$${QMAKE_DIR_SEP}$$module_filename
    83             copy_module_fwd_file.commands = $$QMAKE_COPY  $$toSystemPath($$QMAKE_EXTRA_MODULE_FORWARDS)$${QMAKE_DIR_SEP}$$module_filename $$qt_modules_path
    84             # FIXME: Add dependendy that ensures we copy the forward file if the target is updated
    85             copy_module_fwd_file.depends = $$QMAKE_EXTRA_MODULE_FORWARDS$${QMAKE_DIR_SEP}$$module_filename
    86 
    87             QMAKE_EXTRA_TARGETS += copy_module_fwd_file
    88             DEFAULT_TARGETS += copy_module_fwd_file
    89         }
    90     }
    9143
    9244    # Make sure the install_name of the QtWebKit library point to webkit
  • trunk/Tools/ChangeLog

    r121964 r121965  
     12012-07-06  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
     2
     3        [Qt] Remove custom qmake logic for module creation
     4
     5        Qmake now has the necessary hooks to cleanly override the build locations.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=90461
     8
     9        Reviewed by Tor Arne Vestbø.
     10
     11        * qmake/mkspecs/features/default_pre.prf:
     12
    1132012-07-06  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
    214
  • trunk/Tools/qmake/mkspecs/features/default_pre.prf

    r121964 r121965  
    3232equals(pro_file_name, configure.pro): CONFIG += configure_pass
    3333
    34 # We want the QtWebKit API forwarding includes to live in the root build dir,
    35 # except when we are running the config.tests in Tools/qmake.
    36 !configure_pass: QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR
     34# We want the QtWebKit API forwarding includes to live in the root build dir.
     35MODULE_BASE_DIR = $$ROOT_WEBKIT_DIR
     36MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
    3737
    38 # Load Qt's defaults after we've resolved the build directory. This will also
    39 # run syncqt if there is a sync.profile in the $$_PRO_FILE_PWD_. We never want
    40 # to enable Qt's concept of a developer-build, since we take care of installing
    41 # our own module file. See api.pri for details about how we utilize this.
    42 old_qtdir=$$QTDIR
    43 QTDIR=no-developer-build-please
     38# The qmake files on the other hand live in a subdirectory.
     39MODULE_QMAKE_OUTDIR = $$ROOT_BUILD_DIR/Tools/qmake
     40
     41# Now we're ready to load default_pre from Qt
    4442load(default_pre)
    45 QTDIR=$$old_qtdir
    4643
    4744unix:config_gccdepends {
Note: See TracChangeset for help on using the changeset viewer.