Title: [101133] trunk
Revision
101133
Author
[email protected]
Date
2011-11-24 05:07:54 -0800 (Thu, 24 Nov 2011)

Log Message

[Qt] Get rid of the buildDirForSource() function in the build system

At some point the plan was to allow for running qmake on sub-trees
of the sources, into the top level build directory, but this is no
longer possible, so no reason to keep the convenience function around.

Reviewed by Simon Hausmann.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101132 => 101133)


--- trunk/Source/WebCore/ChangeLog	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Source/WebCore/ChangeLog	2011-11-24 13:07:54 UTC (rev 101133)
@@ -1,3 +1,15 @@
+2011-11-24  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Get rid of the buildDirForSource() function in the build system
+
+        At some point the plan was to allow for running qmake on sub-trees
+        of the sources, into the top level build directory, but this is no
+        longer possible, so no reason to keep the convenience function around.
+
+        Reviewed by Simon Hausmann.
+
+        * DerivedSources.pri:
+
 2011-11-24  Patrick Gansterer  <[email protected]>
 
         [CMake] Add missing source files

Modified: trunk/Source/WebCore/DerivedSources.pri (101132 => 101133)


--- trunk/Source/WebCore/DerivedSources.pri	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Source/WebCore/DerivedSources.pri	2011-11-24 13:07:54 UTC (rev 101133)
@@ -15,7 +15,7 @@
 
 mac {
     # FIXME: This runs the perl script every time. Is there a way we can run it only when deps change?
-    fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Source/WebCore $$buildDirForSource(Source/include) mac
+    fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Source/WebCore $${ROOT_BUILD_DIR}/Source/include mac
     fwheader_generator.depends = $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl
     GENERATORS += fwheader_generator
 }

Modified: trunk/Source/WebKit2/ChangeLog (101132 => 101133)


--- trunk/Source/WebKit2/ChangeLog	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-24 13:07:54 UTC (rev 101133)
@@ -1,3 +1,15 @@
+2011-11-24  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Get rid of the buildDirForSource() function in the build system
+
+        At some point the plan was to allow for running qmake on sub-trees
+        of the sources, into the top level build directory, but this is no
+        longer possible, so no reason to keep the convenience function around.
+
+        Reviewed by Simon Hausmann.
+
+        * DerivedSources.pri:
+
 2011-11-24  Patrick Gansterer  <[email protected]>
 
         [CMake] Add missing source files

Modified: trunk/Source/WebKit2/DerivedSources.pri (101132 => 101133)


--- trunk/Source/WebKit2/DerivedSources.pri	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Source/WebKit2/DerivedSources.pri	2011-11-24 13:07:54 UTC (rev 101133)
@@ -111,7 +111,7 @@
 message_receiver_generator.output_function = message_receiver_generator_output
 GENERATORS += message_receiver_generator
 
-fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $$buildDirForSource(Source/include) qt
+fwheader_generator.commands = perl $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl $${SOURCE_DIR}/WebKit2 $${ROOT_BUILD_DIR}/Source/include qt
 fwheader_generator.depends = $${SOURCE_DIR}/WebKit2/Scripts/generate-forwarding-headers.pl
 generated_files.depends += fwheader_generator
 GENERATORS += fwheader_generator
@@ -121,7 +121,7 @@
     HEADER_PATH = $$HEADER
     HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
     HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
-    DESTDIR = $$buildDirForSource(Source/include/WebCore)
+    DESTDIR = $${ROOT_BUILD_DIR}/Source/include/WebCore
 
     eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
     eval($${HEADER_TARGET}.depends = $$HEADER_PATH)

Modified: trunk/Tools/ChangeLog (101132 => 101133)


--- trunk/Tools/ChangeLog	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/ChangeLog	2011-11-24 13:07:54 UTC (rev 101133)
@@ -1,3 +1,22 @@
+2011-11-24  Tor Arne Vestbø  <[email protected]>
+
+        [Qt] Get rid of the buildDirForSource() function in the build system
+
+        At some point the plan was to allow for running qmake on sub-trees
+        of the sources, into the top level build directory, but this is no
+        longer possible, so no reason to keep the convenience function around.
+
+        Reviewed by Simon Hausmann.
+
+        * WebKitTestRunner/DerivedSources.pri:
+        * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
+        * qmake/mkspecs/features/default_post.prf:
+        * qmake/mkspecs/features/default_pre.prf:
+        * qmake/mkspecs/features/functions.prf:
+        * qmake/mkspecs/features/_javascript_core.prf:
+        * qmake/mkspecs/features/webcore.prf:
+        * qmake/mkspecs/features/webkit2.prf:
+
 2011-11-23  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r101107.

Modified: trunk/Tools/WebKitTestRunner/DerivedSources.pri (101132 => 101133)


--- trunk/Tools/WebKitTestRunner/DerivedSources.pri	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/WebKitTestRunner/DerivedSources.pri	2011-11-24 13:07:54 UTC (rev 101133)
@@ -7,6 +7,6 @@
 TEMPLATE = derived
 
 # Make sure forwarded headers needed by this project are present
-fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Tools/WebKitTestRunner $$buildDirForSource(Source/include) qt
+fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Tools/WebKitTestRunner $${ROOT_BUILD_DIR}/Source/include qt
 fwheader_generator.depends  = $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl
 GENERATORS += fwheader_generator

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri (101132 => 101133)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri	2011-11-24 13:07:54 UTC (rev 101133)
@@ -36,5 +36,5 @@
               $${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts/generate-bindings.pl
 GENERATORS += idl
 
-INCLUDEPATH += $$buildDirForSource(Tools/WebKitTestRunner/InjectedBundle)/$${GENERATED_SOURCES_DESTDIR}
+INCLUDEPATH += $${ROOT_BUILD_DIR}/Tools/WebKitTestRunner/InjectedBundle/$${GENERATED_SOURCES_DESTDIR}
 

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -37,7 +37,7 @@
 
 INCLUDEPATH += \
     $${ROOT_WEBKIT_DIR}/Source \
-    $$buildDirForSource(Source/include) \
+    $${ROOT_BUILD_DIR}/Source/include \
     $${QT.script.includes}
 
 CONFIG -= warn_on

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -21,29 +21,8 @@
 # Resolve root directories for source and build
 ROOT_WEBKIT_DIR = $$replace(IN_PWD, /Tools/qmake/mkspecs/features,)
 WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},)
-ROOT_BUILD_DIR = $$replace(OUT_PWD, $$SOURCE_SUBDIR,)
+ROOT_BUILD_DIR = $$replace(OUT_PWD, $$WEBKIT_SUBDIR,)
 
-# Fix up root build dir in case of running qmake on a subtarget
-subdir_parts = $$split(WEBKIT_SUBDIR, $${QMAKE_DIR_SEP})
-root_build_dir_candidate = $$ROOT_BUILD_DIR
-
-for(ever) {
-    part = $$last(subdir_parts)
-
-    root_build_dir_candidate = $$replace(ROOT_BUILD_DIR, $${QMAKE_DIR_SEP}$${part}$,)
-    !equals(ROOT_BUILD_DIR, $$root_build_dir_candidate) {
-        ROOT_BUILD_DIR = $$root_build_dir_candidate
-    } else {
-        BUILD_SUBDIR = $$subdir_parts
-        break()
-    }
-
-    subdir_parts = $$member(subdir_parts, 0, -2)
-    isEmpty(subdir_parts): break()
-}
-
-BUILD_SUBDIR = $$join(BUILD_SUBDIR, $${QMAKE_DIR_SEP})
-
 # 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.
 pro_file_name = $$basename(_PRO_FILE_)

Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/functions.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -90,13 +90,6 @@
     return($$scope)
 }
 
-defineReplace(buildDirForSource) {
-    unset(source)
-    source = $$1
-
-    return($${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP}$$replace(source, ^$${BUILD_SUBDIR}$${QMAKE_DIR_SEP},))
-}
-
 # Qmake has QMAKE_FILE_IN_PATH, but nothing for the out file
 # This allows you do do ${QMAKE_FUNC_FILE_OUT_PATH}
 defineReplace(PATH) {

Modified: trunk/Tools/qmake/mkspecs/features/_javascript_core.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/_javascript_core.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/_javascript_core.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -15,7 +15,7 @@
 CONFIG(debug, debug|release) : _javascript_CORE_DESTDIR = debug
 else: _javascript_CORE_DESTDIR = release
 
-_javascript_CORE_GENERATED_SOURCES_DIR = $$buildDirForSource(Source/_javascript_Core)/$${GENERATED_SOURCES_DESTDIR}
+_javascript_CORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/_javascript_Core/$${GENERATED_SOURCES_DESTDIR}
 
 _javascript_CORE_INCLUDEPATH = \
     $$_javascript_CORE_SOURCE_DIR \
@@ -75,7 +75,7 @@
 }
 
 needToLinkLibrary(_javascript_Core) {
-    pathToJavaScriptCoreOutput = $$buildDirForSource(Source/_javascript_Core)/$$_javascript_CORE_DESTDIR
+    pathToJavaScriptCoreOutput = $${ROOT_BUILD_DIR}/Source/_javascript_Core/$$_javascript_CORE_DESTDIR
     linkLibrary($$pathToJavaScriptCoreOutput, $$_javascript_CORE_TARGET)
 
     win32-* {

Modified: trunk/Tools/qmake/mkspecs/features/webcore.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/webcore.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/webcore.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -22,7 +22,7 @@
 CONFIG(debug, debug|release) : WEBCORE_DESTDIR = debug
 else: WEBCORE_DESTDIR = release
 
-WEBCORE_GENERATED_SOURCES_DIR = $$buildDirForSource(Source/WebCore)/$${GENERATED_SOURCES_DESTDIR}
+WEBCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebCore/$${GENERATED_SOURCES_DESTDIR}
 
 v8 {
     !haveQt(5): error("To build QtWebKit+V8 you need qtscript-staging's v8 branch. (See: http://qt.gitorious.org/+qt-developers/qt/qtscript-staging)")
@@ -286,6 +286,6 @@
 enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
 
 needToLinkLibrary(WebCore) {
-    pathToWebCoreOutput = $$buildDirForSource(Source/WebCore)/$$WEBCORE_DESTDIR
+    pathToWebCoreOutput = $${ROOT_BUILD_DIR}/Source/WebCore/$$WEBCORE_DESTDIR
     linkLibrary($$pathToWebCoreOutput, $$WEBCORE_TARGET)
 }

Modified: trunk/Tools/qmake/mkspecs/features/webkit2.prf (101132 => 101133)


--- trunk/Tools/qmake/mkspecs/features/webkit2.prf	2011-11-24 13:03:51 UTC (rev 101132)
+++ trunk/Tools/qmake/mkspecs/features/webkit2.prf	2011-11-24 13:07:54 UTC (rev 101133)
@@ -15,7 +15,7 @@
 CONFIG(debug, debug|release) : WEBKIT2_DESTDIR = debug
 else: WEBKIT2_DESTDIR = release
 
-WEBKIT2_GENERATED_SOURCES_DIR = $$buildDirForSource(Source/WebKit2)/$${GENERATED_SOURCES_DESTDIR}
+WEBKIT2_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebKit2/$${GENERATED_SOURCES_DESTDIR}
 
 WEBKIT2_INCLUDEPATH = \
     $$SOURCE_DIR/WebKit2 \
@@ -65,6 +65,6 @@
 INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$INCLUDEPATH
 
 needToLinkLibrary(WebKit2) {
-    pathToWebKit2Output = $$buildDirForSource(Source/WebKit2)/$$WEBKIT2_DESTDIR
+    pathToWebKit2Output = $${ROOT_BUILD_DIR}/Source/WebKit2/$$WEBKIT2_DESTDIR
     linkLibrary($$pathToWebKit2Output, $$WEBKIT2_TARGET)
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to