Title: [178672] trunk
Revision
178672
Author
commit-qu...@webkit.org
Date
2015-01-19 13:58:05 -0800 (Mon, 19 Jan 2015)

Log Message

[GTK] Generate the make dist manifest from a CMake template file
https://bugs.webkit.org/show_bug.cgi?id=139387

Patch by Michael Catanzaro <mcatanz...@igalia.com> on 2015-01-19
Reviewed by Martin Robinson.

.:

Generate manifest.txt from manifest.txt.in. Only expose the dist and
distcheck targets for developer builds, as they won't work when
building from a tarball because the manifest is not distributed.

* Source/PlatformGTK.cmake:

Tools:

Remove the code that performs variable substitution on manifest.txt.
Replace the custom variables used in that file with CMake variables.

* gtk/make-dist.py:
(Manifest.add_directory):
(Manifest.get_full_source_path):
(Manifest.process_line):
(Manifest.resolve_variables): Deleted.
(Manifest.get_full_tarball_path): Deleted.
* gtk/manifest.txt.in: Renamed from Tools/gtk/manifest.txt.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/ChangeLog (178671 => 178672)


--- trunk/ChangeLog	2015-01-19 21:03:02 UTC (rev 178671)
+++ trunk/ChangeLog	2015-01-19 21:58:05 UTC (rev 178672)
@@ -1,3 +1,16 @@
+2015-01-19  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [GTK] Generate the make dist manifest from a CMake template file
+        https://bugs.webkit.org/show_bug.cgi?id=139387
+
+        Reviewed by Martin Robinson.
+
+        Generate manifest.txt from manifest.txt.in. Only expose the dist and
+        distcheck targets for developer builds, as they won't work when
+        building from a tarball because the manifest is not distributed.
+
+        * Source/PlatformGTK.cmake:
+
 2015-01-15  Csaba Osztrogonác  <o...@webkit.org>
 
         Remove ENABLE(SQL_DATABASE) guards

Modified: trunk/Source/PlatformGTK.cmake (178671 => 178672)


--- trunk/Source/PlatformGTK.cmake	2015-01-19 21:03:02 UTC (rev 178671)
+++ trunk/Source/PlatformGTK.cmake	2015-01-19 21:58:05 UTC (rev 178672)
@@ -51,40 +51,46 @@
     COMMAND ${TOOLS_DIR}/gtk/check-for-webkitdom-api-breaks
 )
 
+if (DEVELOPER_MODE)
+    configure_file(
+        ${TOOLS_DIR}/gtk/manifest.txt.in
+        ${CMAKE_BINARY_DIR}/manifest.txt
+    )
 
-add_custom_command(
-    OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
-    DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
-    DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
-    DEPENDS WebKit2
-    DEPENDS gtkdoc
-    COMMAND ${TOOLS_DIR}/gtk/make-dist.py
-            --source-dir=${CMAKE_SOURCE_DIR}
-            --build-dir=${CMAKE_BINARY_DIR}
-            --version=${PROJECT_VERSION}
-            ${TOOLS_DIR}/gtk/manifest.txt
-)
+    add_custom_command(
+        OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+        DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
+        DEPENDS ${CMAKE_BINARY_DIR}/manifest.txt
+        DEPENDS WebKit2
+        DEPENDS gtkdoc
+        COMMAND ${TOOLS_DIR}/gtk/make-dist.py
+                --source-dir=${CMAKE_SOURCE_DIR}
+                --build-dir=${CMAKE_BINARY_DIR}
+                --version=${PROJECT_VERSION}
+                ${CMAKE_BINARY_DIR}/manifest.txt
+    )
 
-add_custom_command(
-    OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
-    DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
-    COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
-)
+    add_custom_command(
+        OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+        DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+        COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+    )
 
-add_custom_target(dist
-    DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
-)
+    add_custom_target(dist
+        DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+    )
 
-add_custom_target(distcheck
-    DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
-    DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
-    DEPENDS WebKit2
-    DEPENDS gtkdoc
-    COMMAND ${TOOLS_DIR}/gtk/make-dist.py
-            --check
-            --source-dir=${CMAKE_SOURCE_DIR}
-            --build-dir=${CMAKE_BINARY_DIR}
-            --version=/webkitgtk-${PROJECT_VERSION}
-            ${TOOLS_DIR}/gtk/manifest.txt
-    COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
-)
+    add_custom_target(distcheck
+        DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
+        DEPENDS ${CMAKE_BINARY_DIR}/manifest.txt
+        DEPENDS WebKit2
+        DEPENDS gtkdoc
+        COMMAND ${TOOLS_DIR}/gtk/make-dist.py
+                --check
+                --source-dir=${CMAKE_SOURCE_DIR}
+                --build-dir=${CMAKE_BINARY_DIR}
+                --version=${PROJECT_VERSION}
+                ${CMAKE_BINARY_DIR}/manifest.txt
+        COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+    )
+endif ()

Modified: trunk/Tools/ChangeLog (178671 => 178672)


--- trunk/Tools/ChangeLog	2015-01-19 21:03:02 UTC (rev 178671)
+++ trunk/Tools/ChangeLog	2015-01-19 21:58:05 UTC (rev 178672)
@@ -1,3 +1,21 @@
+2015-01-19  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [GTK] Generate the make dist manifest from a CMake template file
+        https://bugs.webkit.org/show_bug.cgi?id=139387
+
+        Reviewed by Martin Robinson.
+
+        Remove the code that performs variable substitution on manifest.txt.
+        Replace the custom variables used in that file with CMake variables.
+
+        * gtk/make-dist.py:
+        (Manifest.add_directory):
+        (Manifest.get_full_source_path):
+        (Manifest.process_line):
+        (Manifest.resolve_variables): Deleted.
+        (Manifest.get_full_tarball_path): Deleted.
+        * gtk/manifest.txt.in: Renamed from Tools/gtk/manifest.txt.
+
 2015-01-19  Brent Fulgham  <bfulg...@apple.com>
 
         [Win] Correct merge error in last commit.

Modified: trunk/Tools/gtk/make-dist.py (178671 => 178672)


--- trunk/Tools/gtk/make-dist.py	2015-01-19 21:03:02 UTC (rev 178671)
+++ trunk/Tools/gtk/make-dist.py	2015-01-19 21:58:05 UTC (rev 178672)
@@ -159,27 +159,14 @@
         self.current_directory = directory
         self.directories.append(directory)
 
-    def resolve_variables(self, string, strip=False):
-        if strip:
-            return string.replace('$source', '').replace('$build', '')
-
-        string = string.replace('$source', self.source_root)
-        if self.build_root:
-            string = string.replace('$build', self.build_root)
-        elif string.find('$build') != -1:
-            raise Exception('Manifest has $build but build root not given.')
-        return string
-
     def get_full_source_path(self, source_path):
-        full_source_path = self.resolve_variables(source_path)
-        if not os.path.exists(full_source_path):
-            full_source_path = os.path.join(self.source_root, source_path)
-        if not os.path.exists(full_source_path):
-            raise Exception('Could not find directory %s' % full_source_path)
-        return full_source_path
+        if not os.path.exists(source_path):
+            source_path = os.path.join(self.source_root, source_path)
+        if not os.path.exists(source_path):
+            raise Exception('Could not find directory %s' % source_path)
+        return source_path
 
     def get_full_tarball_path(self, path):
-        path = self.resolve_variables(path, strip=True)
         return self.tarball_root + path
 
     def get_source_and_tarball_paths_from_parts(self, parts):
@@ -202,9 +189,9 @@
         elif parts[0] == "file" and len(parts) > 1:
             self.add_directory(File(*self.get_source_and_tarball_paths_from_parts(parts)))
         elif parts[0] == "exclude" and len(parts) > 1:
-            self.add_rule(Rule(Rule.Result.EXCLUDE, self.resolve_variables(parts[1])))
+            self.add_rule(Rule(Rule.Result.EXCLUDE, parts[1]))
         elif parts[0] == "include" and len(parts) > 1:
-            self.add_rule(Rule(Rule.Result.INCLUDE, self.resolve_variables(parts[1])))
+            self.add_rule(Rule(Rule.Result.INCLUDE, parts[1]))
 
     def should_skip_file(self, directory, filename):
         # Only allow files that are not in version control when they are explicitly included in the manifest from the build dir.

Deleted: trunk/Tools/gtk/manifest.txt (178671 => 178672)


--- trunk/Tools/gtk/manifest.txt	2015-01-19 21:03:02 UTC (rev 178671)
+++ trunk/Tools/gtk/manifest.txt	2015-01-19 21:58:05 UTC (rev 178672)
@@ -1,106 +0,0 @@
-# Global rules
-exclude #$
-exclude ChangeLog
-exclude Makefile
-exclude PlatformEfl.cmake
-exclude PlatformWin.cmake
-exclude tags$
-exclude ~$
-exclude \.#$
-exclude \.bak$
-exclude \.cproject$
-exclude \.git$
-exclude \.gitattributes$
-exclude \.gitignore$
-exclude \.gyp$
-exclude \.icns$
-exclude \.lproj$
-exclude \.m$
-exclude \.mm$
-exclude \.nib$
-exclude \.o$
-exclude \.order$
-exclude \.orig$
-exclude \.pdf$
-exclude \.plist$
-exclude \.pro\.user$
-exclude \.project$
-exclude \.props$
-exclude \.pyc$
-exclude \.pyo$
-exclude \.rej$
-exclude \.rtf$
-exclude \.sb$
-exclude \.sb\.in$
-exclude \.settings$
-exclude \.svn$
-exclude \.sw[a-p]$
-exclude \.vcxproj$
-exclude \.xib$
-exclude \.xcconfig$
-exclude \.xcodeproj$
-
-# Exclude directories from other ports
-exclude .*\/(mac|ios|cf|cg|cocoa|Cocoa|objc|avfoundation|ca|curl|efl|win)\/.*$
-
-directory Source
-exclude Source/_javascript_Core/tests
-exclude Source/WebCore/platform/audio/resources
-exclude Source/WebCore/bindings/scripts/test
-exclude Source/WebCore/platform/efl/DefaultTheme
-exclude Source/WebCore/Resources
-exclude Source/bmalloc
-exclude Source/cmake/EFLHelpers.cmake$
-exclude Source/cmake/OptionsWinCairo.cmake$
-exclude Source/cmake/OptionsWindows.cmake$
-exclude Source/cmake/OptionsAppleWin.cmake$
-exclude Source/cmake/OptionsEfl.cmake$
-exclude Source/cmake/eflsymbols.filter$
-exclude Source/WebInspectorUI/UserInterface/Images
-
-directory Source/WebInspectorUI/UserInterface/Images/gtk
-
-# Most of the files in Source/WebKit are not necessary to build GTK+ and
-# the directory includes lots of images, so we're a bit more picky here.
-exclude Source/WebKit/.*
-exclude Source/WebKit2/Configurations
-exclude Source/WebKit2/Resources
-exclude Source/WebKit2/gtk/NEWS$
-
-# We do want to include the NEWS, but we want it to be in the root of the archive.
-file Source/WebKit2/gtk/NEWS NEWS
-
-file Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
-file Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
-
-# Include only the resources we actually build
-file Source/WebCore/Resources/missingImage.png
-file Source/WebCore/Resources/missingim...@2x.png
-file Source/WebCore/Resources/panIcon.png
-file Source/WebCore/Resources/plugIns.js
-file Source/WebCore/Resources/textAreaResizeCorner.png
-file Source/WebCore/Resources/textarearesizecor...@2x.png
-file Source/WebCore/Resources/urlIcon.png
-file Source/WebCore/platform/audio/resources/Composite.wav
-
-directory Tools/gtk
-directory Tools/ImageDiff
-directory Tools/MiniBrowser
-directory Tools/TestWebKitAPI
-
-directory Tools/DumpRenderTree
-exclude Tools/DumpRenderTree/fonts
-
-directory Tools/WebKitTestRunner
-exclude Tools/WebKitTestRunner/fonts/
-
-file CMakeLists.txt
-file Tools/CMakeLists.txt
-file Tools/Scripts/VCSUtils.pm
-file Tools/Scripts/run-gtk-tests
-file Tools/Scripts/webkit-build-directory
-file Tools/Scripts/webkitdirs.pm
-file Tools/jhbuild/jhbuildutils.py
-
-directory $build/Documentation/webkit2gtk/html Documentation/webkit2gtk/html
-directory $build/Documentation/webkitdomgtk/html Documentation/webkitdomgtk/html

Copied: trunk/Tools/gtk/manifest.txt.in (from rev 178671, trunk/Tools/gtk/manifest.txt) (0 => 178672)


--- trunk/Tools/gtk/manifest.txt.in	                        (rev 0)
+++ trunk/Tools/gtk/manifest.txt.in	2015-01-19 21:58:05 UTC (rev 178672)
@@ -0,0 +1,106 @@
+# Global rules
+exclude #$
+exclude ChangeLog
+exclude Makefile
+exclude PlatformEfl.cmake
+exclude PlatformWin.cmake
+exclude tags$
+exclude ~$
+exclude \.#$
+exclude \.bak$
+exclude \.cproject$
+exclude \.git$
+exclude \.gitattributes$
+exclude \.gitignore$
+exclude \.gyp$
+exclude \.icns$
+exclude \.lproj$
+exclude \.m$
+exclude \.mm$
+exclude \.nib$
+exclude \.o$
+exclude \.order$
+exclude \.orig$
+exclude \.pdf$
+exclude \.plist$
+exclude \.pro\.user$
+exclude \.project$
+exclude \.props$
+exclude \.pyc$
+exclude \.pyo$
+exclude \.rej$
+exclude \.rtf$
+exclude \.sb$
+exclude \.sb\.in$
+exclude \.settings$
+exclude \.svn$
+exclude \.sw[a-p]$
+exclude \.vcxproj$
+exclude \.xib$
+exclude \.xcconfig$
+exclude \.xcodeproj$
+
+# Exclude directories from other ports
+exclude .*\/(mac|ios|cf|cg|cocoa|Cocoa|objc|avfoundation|ca|curl|efl|win)\/.*$
+
+directory Source
+exclude Source/_javascript_Core/tests
+exclude Source/WebCore/platform/audio/resources
+exclude Source/WebCore/bindings/scripts/test
+exclude Source/WebCore/platform/efl/DefaultTheme
+exclude Source/WebCore/Resources
+exclude Source/bmalloc
+exclude Source/cmake/EFLHelpers.cmake$
+exclude Source/cmake/OptionsWinCairo.cmake$
+exclude Source/cmake/OptionsWindows.cmake$
+exclude Source/cmake/OptionsAppleWin.cmake$
+exclude Source/cmake/OptionsEfl.cmake$
+exclude Source/cmake/eflsymbols.filter$
+exclude Source/WebInspectorUI/UserInterface/Images
+
+directory Source/WebInspectorUI/UserInterface/Images/gtk
+
+# Most of the files in Source/WebKit are not necessary to build GTK+ and
+# the directory includes lots of images, so we're a bit more picky here.
+exclude Source/WebKit/.*
+exclude Source/WebKit2/Configurations
+exclude Source/WebKit2/Resources
+exclude Source/WebKit2/gtk/NEWS$
+
+# We do want to include the NEWS, but we want it to be in the root of the archive.
+file Source/WebKit2/gtk/NEWS NEWS
+
+file Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
+file Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
+
+# Include only the resources we actually build
+file Source/WebCore/Resources/missingImage.png
+file Source/WebCore/Resources/missingim...@2x.png
+file Source/WebCore/Resources/panIcon.png
+file Source/WebCore/Resources/plugIns.js
+file Source/WebCore/Resources/textAreaResizeCorner.png
+file Source/WebCore/Resources/textarearesizecor...@2x.png
+file Source/WebCore/Resources/urlIcon.png
+file Source/WebCore/platform/audio/resources/Composite.wav
+
+directory Tools/gtk
+directory Tools/ImageDiff
+directory Tools/MiniBrowser
+directory Tools/TestWebKitAPI
+
+directory Tools/DumpRenderTree
+exclude Tools/DumpRenderTree/fonts
+
+directory Tools/WebKitTestRunner
+exclude Tools/WebKitTestRunner/fonts/
+
+file CMakeLists.txt
+file Tools/CMakeLists.txt
+file Tools/Scripts/VCSUtils.pm
+file Tools/Scripts/run-gtk-tests
+file Tools/Scripts/webkit-build-directory
+file Tools/Scripts/webkitdirs.pm
+file Tools/jhbuild/jhbuildutils.py
+
+directory ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html Documentation/webkit2gtk/html
+directory ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk/html Documentation/webkitdomgtk/html
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to