Lines Matching +full:- +full:- +full:fail +full:- +full:env +full:- +full:changed
1 #!/usr/bin/env python3
3 # Use of this source code is governed by a BSD-style license that can be
39 os.path.join('third_party', 'llvm-build'),
92 # Absolute-looking paths are relative to the source root
142 # Special-case modules that aren't in the shipping product, so don't need
239 Note that it always returns the direct sub-directory of third_party
242 third_party/cld_3/src/src/BUILD.gn -> third_party/cld_3
258 third_party_deps.add(third_party_path[:-1])
264 raise RuntimeError("--gn-out-dir is required if --gn-target is used.")
276 _GnBinary(), "desc", tmp_dir, gn_target, "deps", "--as=buildfile",
277 "--all"
280 gn_deps = gn_deps.decode("utf-8")
314 def EvaluateTemplate(template, env, escape=True): argument
317 for key, val in env.items():
324 env = {
331 'content': EvaluateTemplate(entry_template, env),
338 # Sanity-check to raise a build error if invalid gn_... settings are
390 template_contents = "<!-- Generated by licenses.py; do not edit. -->"
396 changed = True
400 changed = False
403 if changed:
412 # gn gen is run. Otherwise, it will fail to notice new files being
413 # added. This is still not perfect, as it will fail if no build files
414 # are changed, but a new README.chromium / LICENSE is added. This
432 with codecs.open(os.path.join(_REPOSITORY_ROOT, path), 'r', 'utf-8') as f:
437 """Generate a plain-text LICENSE file which can be used when you ship a part
438 of Chromium code (specified by gn_target) as a stand-alone library
441 The LICENSE file contains licenses of both Chromium and third-party
456 content.append('-' * 20)
457 content.append(directory.split(os.sep)[-1])
458 content.append('-' * 20)
464 with codecs.open(output_file, 'w', 'utf-8') as output:
472 parser.add_argument('--file-template',
474 parser.add_argument('--entry-template',
476 parser.add_argument('--target-os', help='OS that this build is targeting.')
477 parser.add_argument('--gn-out-dir',
479 parser.add_argument('--gn-target',
484 parser.add_argument('--depfile',