| Index: third_party/closure_compiler/build/get_includes.py
|
| diff --git a/third_party/closure_compiler/build/get_includes.py b/third_party/closure_compiler/build/get_includes.py
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..6d976dbb88a74448d73568faf06f1eeb964adf45
|
| --- /dev/null
|
| +++ b/third_party/closure_compiler/build/get_includes.py
|
| @@ -0,0 +1,24 @@
|
| +#!/usr/bin/python
|
| +# Copyright 2017 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.
|
| +
|
| +import os.path
|
| +import sys
|
| +
|
| +
|
| +sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
| +import processor
|
| +
|
| +
|
| +def GetIncludes(inputs):
|
| + includes = set()
|
| + for f in inputs:
|
| + includes.update(processor.Processor(f).included_files)
|
| + return includes
|
| +
|
| +
|
| +if __name__ == "__main__":
|
| + # TODO(dpapad): Dedup inputs in ninja files, using relative paths with respect
|
| + # to the out directory.
|
| + print "\n".join(GetIncludes(sys.argv[1:]))
|
|
|