Title: [136836] trunk/Tools
Revision
136836
Author
[email protected]
Date
2012-12-06 05:55:54 -0800 (Thu, 06 Dec 2012)

Log Message

[Qt] Fix the build if the path contains "+" character
https://bugs.webkit.org/show_bug.cgi?id=104120

Reviewed by Tor Arne Vestbø.

The second parameter of qmake's replace() is regular _expression_, so
we have to escape special characters in paths passed to replace().

* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/functions.prf:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (136835 => 136836)


--- trunk/Tools/ChangeLog	2012-12-06 13:54:32 UTC (rev 136835)
+++ trunk/Tools/ChangeLog	2012-12-06 13:55:54 UTC (rev 136836)
@@ -1,3 +1,17 @@
+2012-12-06  Csaba Osztrogonác  <[email protected]>
+
+        [Qt] Fix the build if the path contains "+" character
+        https://bugs.webkit.org/show_bug.cgi?id=104120
+
+        Reviewed by Tor Arne Vestbø.
+
+        The second parameter of qmake's replace() is regular _expression_, so
+        we have to escape special characters in paths passed to replace().
+
+        * qmake/mkspecs/features/default_post.prf:
+        * qmake/mkspecs/features/default_pre.prf:
+        * qmake/mkspecs/features/functions.prf:
+
 2012-12-06  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r136825.

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (136835 => 136836)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-12-06 13:54:32 UTC (rev 136835)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-12-06 13:55:54 UTC (rev 136836)
@@ -301,6 +301,6 @@
 # desination dir is absolute and contains a static path component
 # that also contains either of those two words, so we make DESTDIR
 # relative.
-DESTDIR = $$replace(DESTDIR, ^$${ROOT_BUILD_DIR}, $${BUILD_ROOT_RELATIVE_TO_OUT_PWD})
+DESTDIR = $$replace(DESTDIR, ^$$re_escape($${ROOT_BUILD_DIR}), $${BUILD_ROOT_RELATIVE_TO_OUT_PWD})
 
 load(default_post) # Load Qt's defaults

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (136835 => 136836)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-12-06 13:54:32 UTC (rev 136835)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-12-06 13:55:54 UTC (rev 136836)
@@ -22,8 +22,8 @@
 
 # Resolve root directories for source and build
 ROOT_WEBKIT_DIR = $$replace(PWD, /Tools/qmake/mkspecs/features$,)
-WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},)
-ROOT_BUILD_DIR = $$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,)
+WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $$re_escape($${ROOT_WEBKIT_DIR}),)
+ROOT_BUILD_DIR = $$replace(OUT_PWD, $$re_escape($${WEBKIT_SUBDIR})$,)
 
 # Now we're ready to load default_pre from Qt
 load(default_pre)
@@ -32,7 +32,7 @@
     !recursive_include:CONFIG += root_project_file
     BUILD_ROOT_RELATIVE_TO_OUT_PWD = .
 } else {
-    subdir_parts = $$replace(OUT_PWD, ^$${ROOT_BUILD_DIR}/,)
+    subdir_parts = $$replace(OUT_PWD, ^$$re_escape($${ROOT_BUILD_DIR})/,)
     subdir_parts = $$split(subdir_parts, /)
     for(subdir, subdir_parts) {
         BUILD_ROOT_RELATIVE_TO_OUT_PWD += ..

Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (136835 => 136836)


--- trunk/Tools/qmake/mkspecs/features/functions.prf	2012-12-06 13:54:32 UTC (rev 136835)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf	2012-12-06 13:55:54 UTC (rev 136836)
@@ -53,7 +53,7 @@
     }
 
     # Make directory relative
-    !isEmpty(subdirectory):subdirectory = $$replace(subdirectory, ^$${_PRO_FILE_PWD_}/,)
+    !isEmpty(subdirectory):subdirectory = $$replace(subdirectory, ^$$re_escape($${_PRO_FILE_PWD_})/,)
 
     !isEmpty(subdirectory) {
         subdir_command = cd $$toSystemPath($${subdirectory}$${QMAKE_DIR_SEP}) &&
@@ -245,7 +245,7 @@
 
     target = $$resolveFinalLibraryName($$target)
 
-    path = $$replace(source_dir, $${ROOT_WEBKIT_DIR}, $${ROOT_BUILD_DIR})/$$activeBuildConfig()
+    path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$activeBuildConfig()
 
     force_static_libs_as_shared {
             LIBS += -L$${ROOT_BUILD_DIR}/lib -l$$target
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to