Log Message
[GTK][CMake] Add a 'distcheck' target https://bugs.webkit.org/show_bug.cgi?id=130675
.: Reviewed by Gustavo Noronha Silva. * Source/PlatformGTK.cmake: Add distcheck target. Tools: Patch by Carlos Garcia Campos <[email protected]> and Martin Robinson <[email protected]> on 2014-07-10 Reviewed by Gustavo Noronha Silva. Add --check option to make-dist script that builds and installs the tarball. * gtk/make-dist.py: (Distcheck.__init__): (Distcheck.extract_tarball): Extratc the tarball. (Distcheck.configure): Run cmake. (Distcheck.configure.create_dir): Helper function to create a directory. (Distcheck.build): Run make. (Distcheck.install): Run make install. (Distcheck.clean): Clean up the extracted tarball. (Distcheck.check): Run all previous methods in order. * gtk/manifest.txt: Add missing file.
Modified Paths
Diff
Modified: trunk/ChangeLog (170964 => 170965)
--- trunk/ChangeLog 2014-07-10 16:11:11 UTC (rev 170964)
+++ trunk/ChangeLog 2014-07-10 16:13:54 UTC (rev 170965)
@@ -1,5 +1,14 @@
2014-07-10 Carlos Garcia Campos <[email protected]>
+ [GTK][CMake] Add a 'distcheck' target
+ https://bugs.webkit.org/show_bug.cgi?id=130675
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * Source/PlatformGTK.cmake: Add distcheck target.
+
+2014-07-10 Carlos Garcia Campos <[email protected]>
+
[GTK] Use the same default options for production builds that previous stable releases
https://bugs.webkit.org/show_bug.cgi?id=134589
Modified: trunk/Source/PlatformGTK.cmake (170964 => 170965)
--- trunk/Source/PlatformGTK.cmake 2014-07-10 16:11:11 UTC (rev 170964)
+++ trunk/Source/PlatformGTK.cmake 2014-07-10 16:13:54 UTC (rev 170965)
@@ -71,4 +71,19 @@
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}
+ --tarball-root=/webkitgtk-${PROJECT_VERSION}
+ -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ ${TOOLS_DIR}/gtk/manifest.txt
+ COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ )
endif ()
Modified: trunk/Tools/ChangeLog (170964 => 170965)
--- trunk/Tools/ChangeLog 2014-07-10 16:11:11 UTC (rev 170964)
+++ trunk/Tools/ChangeLog 2014-07-10 16:13:54 UTC (rev 170965)
@@ -1,3 +1,23 @@
+2014-07-10 Carlos Garcia Campos <[email protected]> and Martin Robinson <[email protected]>
+
+ [GTK][CMake] Add a 'distcheck' target
+ https://bugs.webkit.org/show_bug.cgi?id=130675
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Add --check option to make-dist script that builds and installs the tarball.
+
+ * gtk/make-dist.py:
+ (Distcheck.__init__):
+ (Distcheck.extract_tarball): Extratc the tarball.
+ (Distcheck.configure): Run cmake.
+ (Distcheck.configure.create_dir): Helper function to create a directory.
+ (Distcheck.build): Run make.
+ (Distcheck.install): Run make install.
+ (Distcheck.clean): Clean up the extracted tarball.
+ (Distcheck.check): Run all previous methods in order.
+ * gtk/manifest.txt: Add missing file.
+
2014-07-10 Carlos Garcia Campos <[email protected]>
[GTK] Use the same default options for production builds that previous stable releases
Modified: trunk/Tools/gtk/make-dist.py (170964 => 170965)
--- trunk/Tools/gtk/make-dist.py 2014-07-10 16:11:11 UTC (rev 170964)
+++ trunk/Tools/gtk/make-dist.py 2014-07-10 16:13:54 UTC (rev 170965)
@@ -19,9 +19,12 @@
from contextlib import closing
import argparse
+import errno
+import multiprocessing
import os
import re
-import sys
+import shutil
+import subprocess
import tarfile
@@ -203,12 +206,67 @@
print("Wrote {0}".format(output).ljust(40))
+class Distcheck(object):
+ BUILD_DIRECTORY_NAME = "_build"
+ INSTALL_DIRECTORY_NAME = "_install"
+
+ def __init__(self, source_root, build_root):
+ self.source_root = source_root
+ self.build_root = build_root
+
+ def extract_tarball(self, tarball_path):
+ with closing(tarfile.open(tarball_path, 'r')) as tarball:
+ tarball.extractall(self.build_root)
+
+ def configure(self, build_dir, install_dir):
+ def create_dir(directory, directory_type):
+ try:
+ os.mkdir(directory)
+ except OSError, e:
+ if e.errno != errno.EEXIST or not os.path.isdir(directory):
+ raise Exception("Could not create %s dir at %s: %s" % (directory_type, directory, str(e)))
+
+ create_dir(build_dir, "build")
+ create_dir(install_dir, "install")
+
+ command = ['cmake', '-DPORT=GTK', '-DCMAKE_INSTALL_PREFIX=%s' % install_dir, '-DCMAKE_BUILD_TYPE=Release', self.source_root]
+ subprocess.check_call(command, cwd=build_dir)
+
+ def build(self, build_dir):
+ command = ['make']
+ make_args = os.getenv('MAKE_ARGS')
+ if make_args:
+ command.extend(make_args.split(' '))
+ else:
+ command.append('-j%d' % multiprocessing.cpu_count())
+ subprocess.check_call(command, cwd=build_dir)
+
+ def install(self, build_dir):
+ subprocess.check_call(['make', 'install'], cwd=build_dir)
+
+ def clean(self, dist_dir):
+ shutil.rmtree(dist_dir)
+
+ def check(self, tarball):
+ tarball_name, ext = os.path.splitext(os.path.basename(tarball))
+ dist_dir = os.path.join(self.build_root, tarball_name)
+ build_dir = os.path.join(dist_dir, self.BUILD_DIRECTORY_NAME)
+ install_dir = os.path.join(dist_dir, self.INSTALL_DIRECTORY_NAME)
+
+ self.extract_tarball(tarball)
+ self.configure(build_dir, install_dir)
+ self.build(build_dir)
+ self.install(build_dir)
+ self.clean(dist_dir)
+
if __name__ == "__main__":
class FilePathAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, os.path.abspath(values))
parser = argparse.ArgumentParser(description='Build a distribution bundle.')
+ parser.add_argument('-c', '--check', action='',
+ help='Check the tarball')
parser.add_argument('-s', '--source-dir', type=str, action="" default=os.getcwd(),
help='The top-level directory of the source distribution. ' + \
'Directory for relative paths. Defaults to current directory.')
@@ -230,3 +288,6 @@
manifest = Manifest(arguments.manifest_filename, arguments.source_dir, arguments.build_dir, arguments.tarball_root)
manifest.create_tarfile(arguments.output_filename)
+
+ if arguments.check:
+ Distcheck(arguments.source_dir, arguments.build_dir).check(arguments.output_filename)
Modified: trunk/Tools/gtk/manifest.txt (170964 => 170965)
--- trunk/Tools/gtk/manifest.txt 2014-07-10 16:11:11 UTC (rev 170964)
+++ trunk/Tools/gtk/manifest.txt 2014-07-10 16:13:54 UTC (rev 170965)
@@ -44,6 +44,8 @@
# 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
+
directory Tools/gtk
directory Tools/ImageDiff
directory Tools/MiniBrowser
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
