• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:rules

2 # -*- coding: utf-8 -*-
3 """This script generates abseil.podspec from all BUILD.bazel files.
6 It recursively analyzes BUILD.bazel files using query command of Bazel to
7 dump its build rules in XML format. From these rules, it constructs podspec
28 s.authors = { 'Abseil Team' => 'abseil-io@googlegroups.com' }
30 :git => 'https://github.com/abseil/abseil-cpp.git',
37 s.compiler_flags = '-Wno-everything'
49 # Rule object representing the rule of Bazel BUILD.
71 # e.g. ["//absl/strings:dir/header.h"] -> ["absl/strings/dir/header.h"]
90 """Runs bazel query on given package file and returns all cc rules."""
92 ["bazel", "query", package + ":all", "--output", "xml"])
102 """Collects and returns all rules from root path recursively."""
103 rules = []
105 build_path = os.path.join(cur, "BUILD.bazel")
107 rules.extend(read_build("//" + cur))
108 return rules
118 # ignore test-only rule
131 # e.g. //absl/apple/banana -> abseil/apple/banana
135 def write_podspec(f, rules, args): argument
136 """Writes a podspec from given rules and args."""
137 rule_dir = build_rule_directory(rules)["abseil"]
142 # Write all target rules
147 def build_rule_directory(rules): argument
148 """Builds a tree-style rule directory from given rules."""
150 for rule in rules:
201 """Generates a podspec file from all BUILD files under absl directory."""
202 rules = filter(relevant_rule, collect_rules("absl"))
204 write_podspec(f, rules, vars(args))
209 description="Generates abseil.podspec from BUILD.bazel")
211 "-v", "--version", help="The version of podspec", required=True)
213 "-t",
214 "--tag",
218 "-o",
219 "--output",