Title: [161263] trunk
- Revision
- 161263
- Author
- [email protected]
- Date
- 2014-01-03 09:03:10 -0800 (Fri, 03 Jan 2014)
Log Message
[CMake] The forwarding headers generated by WebKitMacros.m4 are incompatible with the headers generated by generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=126361
Reviewed by Philippe Normand.
Make the forwarding headers generated by WebKitMacros.m4 compatible with the headers
generated by the WebKit2 forwarding headers generation script.
* Source/cmake/WebKitMacros.cmake: Try to convert absolute paths in the forwarding headers
to ones that are relative to the Source directory.
Modified Paths
Diff
Modified: trunk/ChangeLog (161262 => 161263)
--- trunk/ChangeLog 2014-01-03 17:02:16 UTC (rev 161262)
+++ trunk/ChangeLog 2014-01-03 17:03:10 UTC (rev 161263)
@@ -1,3 +1,16 @@
+2014-01-03 Martin Robinson <[email protected]>
+
+ [CMake] The forwarding headers generated by WebKitMacros.m4 are incompatible with the headers generated by generate-forwarding-headers.pl
+ https://bugs.webkit.org/show_bug.cgi?id=126361
+
+ Reviewed by Philippe Normand.
+
+ Make the forwarding headers generated by WebKitMacros.m4 compatible with the headers
+ generated by the WebKit2 forwarding headers generation script.
+
+ * Source/cmake/WebKitMacros.cmake: Try to convert absolute paths in the forwarding headers
+ to ones that are relative to the Source directory.
+
2014-01-02 Carlos Garcia Campos <[email protected]>
REGRESSION(r160304): [GTK] Disable libtool fast install
Modified: trunk/Source/cmake/WebKitMacros.cmake (161262 => 161263)
--- trunk/Source/cmake/WebKitMacros.cmake 2014-01-03 17:02:16 UTC (rev 161262)
+++ trunk/Source/cmake/WebKitMacros.cmake 2014-01-03 17:03:10 UTC (rev 161263)
@@ -203,17 +203,24 @@
macro(WEBKIT_CREATE_FORWARDING_HEADER _target_directory _file)
+ get_filename_component(_source_path "${CMAKE_SOURCE_DIR}/Source/" ABSOLUTE)
get_filename_component(_absolute "${_file}" ABSOLUTE)
get_filename_component(_name "${_file}" NAME)
- set(_content "#include \"${_absolute}\"\n")
- set(_filename "${_target_directory}/${_name}")
+ set(_target_filename "${_target_directory}/${_name}")
- if (EXISTS "${_filename}")
- file(READ "${_filename}" _old_content)
+ # Try to make the path in the forwarding header relative to the Source directory
+ # so that these forwarding headers are compatible with the ones created by the
+ # WebKit2 generate-forwarding-headers script.
+ string(REGEX REPLACE "${_source_path}/" "" _relative ${_absolute})
+
+ set(_content "#include \"${_relative}\"\n")
+
+ if (EXISTS "${_target_filename}")
+ file(READ "${_target_filename}" _old_content)
endif ()
if (NOT _old_content STREQUAL _content)
- file(WRITE "${_filename}" "${_content}")
+ file(WRITE "${_target_filename}" "${_content}")
endif ()
endmacro()
@@ -226,7 +233,7 @@
foreach (_file ${_files})
file(READ "${_file}" _content)
string(REGEX MATCH "^#include \"([^\"]*)\"" _matched ${_content})
- if (_matched AND NOT EXISTS "${CMAKE_MATCH_1}")
+ if (_matched AND NOT EXISTS "${CMAKE_SOURCE_DIR}/Source/${CMAKE_MATCH_1}")
file(REMOVE "${_file}")
endif ()
endforeach ()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes