+2014-02-06 Peter Szanka <h868064@stud.u-szeged.hu>
+
+ Extract common parts from jhbuildrc files.
+ https://bugs.webkit.org/show_bug.cgi?id=125986
+
+ Reviewed by Csaba Osztrogonác.
+
+ * efl/common.py: Removed.
+ * efl/jhbuildrc:
+ * gtk/common.py:
+ (binary_build_path):
+ * gtk/find-make-dist-errors:
+ (get_missing_headers):
+ * gtk/generate-gtkdoc:
+ (get_webkit2_options):
+ (get_webkit1_options.src_path):
+ (get_webkit1_options):
+ (get_webkitdom_options.src_path):
+ (get_webkitdom_options):
+ * gtk/generate-inspector-gresource-manifest.py:
+ * gtk/jhbuildrc:
+ * jhbuild/jhbuildrc_common.py: Added.
+ (script_path):
+ (top_level_path):
+ (init):
+ * nix/common.py: Removed.
+ * nix/jhbuildrc:
+
2014-02-06 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed fix after r163520, remove Andrei from committers list, because
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (C) 2011 Igalia S.L.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-import os
-
-script_dir = None
-
-
-def script_path(*args):
- global script_dir
- if not script_dir:
- script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
- return os.path.join(*(script_dir,) + args)
-
-
-def top_level_path(*args):
- return os.path.join(*((script_path('..', '..'),) + args))
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import multiprocessing
-import sys
-
-__efl_tools_directory = os.path.abspath(os.path.dirname(__file__))
-sys.path = [__efl_tools_directory] + sys.path
-import common
-
-build_policy = 'updated'
-
-# FIXME: move shared parts into ../jhbuild folder.
-
-__moduleset_file_uri = 'file://' + os.path.join(__efl_tools_directory, 'jhbuild.modules')
-__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
-moduleset = [ __moduleset_file_uri, ]
-if __extra_modulesets != ['']:
- moduleset.extend(__extra_modulesets)
-
-__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
-modules = [ 'webkitefl-testing-dependencies', ]
-if __extra_modules != ['']:
- modules.extend(__extra_modules)
-
-if os.environ.has_key('WEBKIT_OUTPUTDIR'):
- checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
- prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
-else:
- checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
- prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
-
-nonotify = True
-notrayicon = True
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+jhbuildrc_common.init(globals(), "efl")
if 'NUMBER_OF_PROCESSORS' in os.environ:
jobs = os.environ['NUMBER_OF_PROCESSORS']
import subprocess
import sys
-script_dir = None
build_dir = None
library_build_dir = None
tests_library_build_dir = None
return library_build_dir
-def script_path(*args):
- global script_dir
- if not script_dir:
- script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
- return os.path.join(*(script_dir,) + args)
-
-
-def top_level_path(*args):
- return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
-
-
def get_build_path(fatal=True):
global build_dir
if build_dir:
import subprocess
import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+
def is_source_file_listing(line):
return line.strip().startswith('Source')
def get_missing_headers(listed_makefile_headers):
missing = set()
for header in listed_makefile_headers:
- if not os.path.exists(common.top_level_path(header)):
+ if not os.path.exists(jhbuildrc_common.top_level_path(header)):
missing.add(header)
return missing
import os.path
import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+
def configure_logging():
level = logging.DEBUG if '-v' in sys.argv else logging.INFO
logger = logging.getLogger('gtkdoc')
return common.build_path('Documentation', 'webkitdomgtk', 'html')
def get_webkit2_options():
- api_path = common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
- injected_bundle_api_path = common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
+ api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
+ injected_bundle_api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
if common.is_cmake_build():
generated_api_path = common.build_path('DerivedSources', 'webkit2gtk', 'webkit2')
'source_dirs' : [src_path(), generated_api_path, injected_bundle_api_path],
'cflags' :
# Common paths
- ' -I' + common.top_level_path('Source') + \
+ ' -I' + jhbuildrc_common.top_level_path('Source') + \
' -I' + api_path + \
# Autotools paths
' -I' + common.build_path('DerivedSources', 'webkit2gtk', 'include') + \
def get_webkit1_options(gtk_version):
def src_path(*args):
- return common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
+ return jhbuildrc_common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
def webkitversionh_path():
if common.is_cmake_build():
'cflags' : ' -I' + common.build_path('WebKit', 'gtk') + \
' -I' + common.build_path('DerivedSources') + \
' -I' + src_path() + \
- ' -I' + common.top_level_path('Source') + \
- ' -I' + common.top_level_path('Source', 'JavaScriptCore', 'ForwardingHeaders'),
+ ' -I' + jhbuildrc_common.top_level_path('Source') + \
+ ' -I' + jhbuildrc_common.top_level_path('Source', 'JavaScriptCore', 'ForwardingHeaders'),
'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps) + [webkitdom_docs_html_path()],
'ignored_files': glob.glob(src_path('webkit', '*private.*')) + \
glob.glob(src_path('webkit', 'webkitauthenticationdialog.*')) + \
def derived_sources_path(*args):
return common.build_path(*(('DerivedSources', 'webkitdom') + args))
def src_path(*args):
- return common.top_level_path(*(('Source', 'WebCore', 'bindings', 'gobject') + args))
+ return jhbuildrc_common.top_level_path(*(('Source', 'WebCore', 'bindings', 'gobject') + args))
xref_deps = { 'glib-2.0' : ['glib', 'gobject', 'gio'] }
'source_dirs' : [derived_sources_path()],
'cflags' : ' -I' + derived_sources_path() + \
' -I' + src_path() + \
- ' -I' + common.top_level_path('Source'),
+ ' -I' + jhbuildrc_common.top_level_path('Source'),
'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps),
'ignored_files': glob.glob(derived_sources_path('*Private.h'))
})
import os
import sys
-resources_path = common.top_level_path() + "/Source/WebInspectorUI/"
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common
+
+resources_path = jhbuildrc_common.top_level_path() + "/Source/WebInspectorUI/"
inspector_files = \
glob.glob(resources_path + 'UserInterface/*.html') + \
glob.glob(resources_path + 'UserInterface/*.js') + \
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import multiprocessing
-import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+jhbuildrc_common.init(globals(), "gtk")
__gtk_tools_directory = os.path.abspath(os.path.dirname(__file__))
sys.path = [__gtk_tools_directory] + sys.path
import common
-build_policy = 'updated'
-
-__moduleset_file_uri = 'file://' + os.path.join(__gtk_tools_directory, 'jhbuild.modules')
-__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
-moduleset = [ __moduleset_file_uri, ]
-if __extra_modulesets != ['']:
- moduleset.extend(__extra_modulesets)
-
-__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
-modules = [ 'webkitgtk-testing-dependencies', ]
-if __extra_modules != ['']:
- modules.extend(__extra_modules)
-
-if os.environ.has_key('WEBKIT_OUTPUTDIR'):
- checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
- prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
-else:
- checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
- prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
-
-nonotify = True
-notrayicon = True
-
if 'NUMBER_OF_PROCESSORS' in os.environ:
jobs = os.environ['NUMBER_OF_PROCESSORS']
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2011 Igalia S.L.
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2012, 2013 Nokia Corporation and/or its subsidiary(-ies).
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import multiprocessing
+import sys
+import os
+
+script_dir = None
+
+
+def script_path(*args):
+ global script_dir
+ if not script_dir:
+ script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
+ return os.path.join(*(script_dir,) + args)
+
+
+def top_level_path(*args):
+ return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
+
+
+def init(jhbuildrc_globals, platform):
+
+ __tools_directory = os.path.join(os.path.dirname(__file__), "../", platform)
+ sys.path.insert(0, __tools_directory)
+
+ jhbuildrc_globals["build_policy"] = 'updated'
+
+ __moduleset_file_uri = 'file://' + os.path.join(__tools_directory, 'jhbuild.modules')
+ __extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
+ jhbuildrc_globals["moduleset"] = [__moduleset_file_uri, ]
+ if __extra_modulesets != ['']:
+ jhbuildrc_globals["moduleset"].extend(__extra_modulesets)
+
+ __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
+ jhbuildrc_globals["modules"] = ['webkit' + platform + '-testing-dependencies', ]
+ if __extra_modules != ['']:
+ jhbuildrc_globals["modules"].extend(__extra_modules)
+
+ if 'WEBKIT_OUTPUTDIR' in os.environ:
+ jhbuildrc_globals["checkoutroot"] = checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
+ jhbuildrc_globals["prefix"] = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
+ else:
+ jhbuildrc_globals["checkoutroot"] = checkoutroot = os.path.abspath(top_level_path('WebKitBuild', 'Dependencies', 'Source'))
+ jhbuildrc_globals["prefix"] = os.path.abspath(top_level_path('WebKitBuild', 'Dependencies', 'Root'))
+
+ jhbuildrc_globals["nonotify"] = True
+ jhbuildrc_globals["notrayicon"] = True
+++ /dev/null
-#!/usr/bin/env python
-# Copyright (C) 2011 Igalia S.L.
-# Copyright (C) 2012, 2013 Nokia Corporation and/or its subsidiary(-ies).
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-import os
-
-script_dir = None
-
-
-def script_path(*args):
- global script_dir
- if not script_dir:
- script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
- return os.path.join(*(script_dir,) + args)
-
-
-def top_level_path(*args):
- return os.path.join(*((script_path('..', '..'),) + args))
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import multiprocessing
-import sys
-import os
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+jhbuildrc_common.init(globals(), "nix")
-__nix_tools_directory = os.path.abspath(os.path.dirname(__file__))
-sys.path = [__nix_tools_directory] + sys.path
-import common
-
-build_policy = 'updated'
-
-# FIXME: move shared parts into ../jhbuild folder.
-
-__moduleset_file_uri = 'file://' + os.path.join(__nix_tools_directory, 'jhbuild.modules')
-__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
-moduleset = [ __moduleset_file_uri, ]
-if __extra_modulesets != ['']:
- moduleset.extend(__extra_modulesets)
-
-__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
-modules = [ 'webkitnix-testing-dependencies', ]
-if __extra_modules != ['']:
- modules.extend(__extra_modules)
-
-if os.environ.has_key('WEBKIT_OUTPUTDIR'):
- checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
- prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
-else:
- checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
- prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
-
-nonotify = True
-notrayicon = True
if 'MAKEFLAGS' not in os.environ:
os.environ['MAKEFLAGS'] = '-j%d' % multiprocessing.cpu_count()