Change log:95336cb92b..191d55580eFull diff:95336cb92b..191d55580eRoll chromium third_party 4e16929f46..3a8f2a9e1e Change log:4e16929f46..3a8f2a9e1eChanged dependencies: * src/tools:c44a3f5eca..f524a53b81DEPS diff:95336cb92b..191d55580e/DEPS No update to Clang. TBR=titovartem@google.com, BUG=None CQ_INCLUDE_TRYBOTS=master.internal.tryserver.corp.webrtc:linux_internal Change-Id: Ic9c4a62b050383646e9fcf5cc07a5653c14ac06e Reviewed-on: https://webrtc-review.googlesource.com/76120 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23205}
82 lines
2.1 KiB
Python
Executable File
82 lines
2.1 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# Copyright 2016 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Usage:
|
|
#
|
|
# cd third_party/closure_compiler
|
|
# tools/create_include_gyp.py externs > externs/compiled_resources2.gyp
|
|
# tools/create_include_gyp.py interfaces > interfaces/compiled_resources2.gyp
|
|
|
|
from datetime import date
|
|
import os
|
|
import sys
|
|
|
|
|
|
_INCLUDE_GYPI = os.path.join(os.path.dirname(__file__), '..', 'include_js.gypi')
|
|
|
|
|
|
_INCLUDE_TEMPLATE = """
|
|
# Copyright %d The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
########################################################
|
|
# NOTE: THIS FILE IS GENERATED. DO NOT EDIT IT! #
|
|
# Instead, run create_include_gyp.py to regenerate it. #
|
|
########################################################
|
|
{
|
|
'targets': [
|
|
%s,
|
|
],
|
|
}""".lstrip()
|
|
|
|
|
|
_TARGET_TEMPLATE_NO_CHROME_DEPENDENCY = """
|
|
{
|
|
'target_name': '%s',
|
|
'includes': ['%s'],
|
|
}"""
|
|
|
|
_TARGET_TEMPLATE = """
|
|
{
|
|
'target_name': '%s',
|
|
'dependencies': ['chrome'],
|
|
'includes': ['%s'],
|
|
}"""
|
|
|
|
# Add externs files that do not depend on chrome.* namespace here. Everything
|
|
# else will have chrome.js as a dependency.
|
|
NO_CHROME_DEPENDENCY = set([
|
|
'chrome.js',
|
|
'mojo.js',
|
|
'pending.js',
|
|
'polymer-1.0.js',
|
|
'web_animations.js',
|
|
])
|
|
|
|
def CreateIncludeGyp(directory):
|
|
include_path = os.path.normpath(os.path.relpath(_INCLUDE_GYPI, directory))
|
|
js_files = [f for f in os.listdir(directory) if f.endswith('.js')]
|
|
js_files.sort()
|
|
|
|
targets = []
|
|
for f in js_files:
|
|
template = (_TARGET_TEMPLATE_NO_CHROME_DEPENDENCY if f in
|
|
NO_CHROME_DEPENDENCY else _TARGET_TEMPLATE)
|
|
targets.append(template % (f[:-3], include_path))
|
|
return _INCLUDE_TEMPLATE % (date.today().year, ",".join(targets).strip())
|
|
|
|
|
|
def ShowUsageAndDie():
|
|
print "usage: tools/create_include_gyp.py externs/ > externs/compiled_resources2.gyp"
|
|
sys.exit(1)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) != 2:
|
|
ShowUsageAndDie()
|
|
|
|
print CreateIncludeGyp(sys.argv[1])
|