Changeset 101089 in webkit
- Timestamp:
- Nov 23, 2011, 10:19:18 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r101079 r101089 1 2011-11-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 [Qt] Re-generate QtWebKit API forwarding headers when API changes 4 5 The forwarding headers are generated by syncqt, and syncqt is run by qmake, 6 so we need sync.profile to live in the same directory as the project file 7 that will be touched when adding/removing API (api.pri in our case). 8 9 Since the WebKit2 APIs live in a separate static library, we have to 10 add the project file for WebKit2 as a dependency of the api.pri file 11 as well, so that any changes to the WebKit2 API will still trigger a 12 run of qmake (and then syncqt). 13 14 Lastly, we use the new QMAKE_SYNCQT_OUTDIR variable in Qt 5 to ensure 15 that the forwarding headers are still generated in the root build dir, 16 not in the Source dir along with the internal forwarding headers. 17 18 Reviewed by Andreas Kling. 19 20 * Source/QtWebKit.pro: 21 * Source/api.pri: 22 * Source/sync.profile: Renamed from sync.profile. 23 1 24 2011-11-23 Halton Huo <halton.huo@intel.com> 2 25 -
trunk/Source/QtWebKit.pro
r100602 r101089 30 30 SUBDIRS += examples 31 31 32 haveQt(4):!build_pass {33 # Use our own copy of syncqt from Qt 4.8 to generate forwarding headers34 syncqt = $$toSystemPath($${ROOT_WEBKIT_DIR}/Tools/qmake/syncqt-4.8)35 command = $$syncqt36 win32-msvc*: command = $$command -windows37 38 outdir = $$toSystemPath($${ROOT_BUILD_DIR})39 40 # The module root has to be the same as directory of the pro-file that generates41 # the install rules (api.pri), otherwise the relative paths in the generated42 # headers.pri will be incorrect.43 module_rootdir = $$toSystemPath($${_PRO_FILE_PWD_})44 45 module = $${TARGET}$${DIRLIST_SEPARATOR}$${module_rootdir}$${DIRLIST_SEPARATOR}$$toSystemPath(WebKit/qt/Api)46 fwheader_generator.commands = perl $${command} -outdir $${outdir} -separate-module $${module}47 fwheader_generator.depends = $${syncqt}48 49 variables = $$computeSubdirVariables(api)50 51 api_qmake.target = $$eval($${variables}.target)-qmake_all52 api_qmake.depends = fwheader_generator53 54 api_makefile.target = $$eval($${variables}.makefile)55 api_makefile.depends = fwheader_generator56 57 QMAKE_EXTRA_TARGETS += fwheader_generator api_qmake api_makefile58 } -
trunk/Source/api.pri
r100853 r101089 10 10 DESTDIR = $${ROOT_BUILD_DIR}/lib 11 11 12 runSyncQt() # Generate forwarding headers for the QtWebKit API 13 12 14 load(features) 13 15 … … 21 23 CONFIG += webkit2 22 24 QT += declarative 25 26 # Ensure that changes to the WebKit2 API will trigger a qmake of this 27 # file, which in turn runs syncqt to update the forwarding headers. 28 QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri 23 29 } 24 30 -
trunk/Source/sync.profile
r101088 r101089 1 1 %modules = ( # path to module name map 2 # Has to be the same directory as the pro file that generates install rules, 3 # otherwise the relative paths in headers.pri will not be correct. 4 "QtWebKit" => "$basedir/Source" 2 "QtWebKit" => "$basedir" 5 3 ); 6 4 %moduleheaders = ( # restrict the module headers to those found in relative path … … 16 14 ); 17 15 %modulepris = ( 18 "QtWebKit" => "$basedir/ Tools/qmake/mkspecs/modules/qt_webkit.pri",16 "QtWebKit" => "$basedir/../Tools/qmake/mkspecs/modules/qt_webkit.pri", 19 17 ); 20 18 @ignore_for_master_contents = ( "qwebscriptworld.h" ); -
trunk/Tools/ChangeLog
r101076 r101089 1 2011-11-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 [Qt] Re-generate QtWebKit API forwarding headers when API changes 4 5 The forwarding headers are generated by syncqt, and syncqt is run by qmake, 6 so we need sync.profile to live in the same directory as the project file 7 that will be touched when adding/removing API (api.pri in our case). 8 9 Since the WebKit2 APIs live in a separate static library, we have to 10 add the project file for WebKit2 as a dependency of the api.pri file 11 as well, so that any changes to the WebKit2 API will still trigger a 12 run of qmake (and then syncqt). 13 14 Lastly, we use the new QMAKE_SYNCQT_OUTDIR variable in Qt 5 to ensure 15 that the forwarding headers are still generated in the root build dir, 16 not in the Source dir along with the internal forwarding headers. 17 18 Reviewed by Andreas Kling. 19 20 * qmake/mkspecs/features/default_pre.prf: 21 * qmake/mkspecs/features/functions.prf: 22 1 23 2011-11-23 Johnny Ding <jnd@chromium.org> 2 24 -
trunk/Tools/qmake/mkspecs/features/default_pre.prf
r100602 r101089 6 6 # ------------------------------------------------------------------- 7 7 8 load(default_pre) # Load Qt's defaults9 8 load(functions) 10 9 … … 45 44 46 45 BUILD_SUBDIR = $$join(BUILD_SUBDIR, $${QMAKE_DIR_SEP}) 46 47 # We want the QtWebKit API forwarding includes to live in the root build dir, 48 # except when we are running the config.tests in Tools/qmake. 49 pro_file_name = $$basename(_PRO_FILE_) 50 !equals(pro_file_name, configure.pro): QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR 51 52 load(default_pre) # Load Qt's defaults after we've resolved the build directory 47 53 48 54 equals(OUT_PWD, $${ROOT_BUILD_DIR}) { -
trunk/Tools/qmake/mkspecs/features/functions.prf
r100952 r101089 281 281 return(true) 282 282 } 283 284 defineTest(runSyncQt) { 285 286 build_pass:return(true) 287 288 haveQt(5) { 289 # Qt 5 will run synqt as part of defaults_pre, so no need to do anything 290 } else { 291 # Use our own copy of syncqt from Qt 4.8 to generate forwarding headers 292 syncqt = $$toSystemPath($${ROOT_WEBKIT_DIR}/Tools/qmake/syncqt-4.8) 293 command = $$syncqt 294 win32-msvc*: command = $$command -windows 295 296 outdir = $$toSystemPath($${ROOT_BUILD_DIR}) 297 298 # The module root has to be the same as directory of the pro-file that generates 299 # the install rules (api.pri), otherwise the relative paths in the generated 300 # headers.pri will be incorrect. 301 module_rootdir = $$toSystemPath($${_PRO_FILE_PWD_}) 302 303 module = $${TARGET}$${DIRLIST_SEPARATOR}$${module_rootdir}$${DIRLIST_SEPARATOR}$$toSystemPath(WebKit/qt/Api) 304 command = perl $${command} -outdir $${outdir} -separate-module $${module} 305 message(Running $$command) 306 !system($$command) { 307 error(Failed to run $${command}) 308 } 309 } 310 311 return(true) 312 }
Note:
See TracChangeset
for help on using the changeset viewer.