Use Rule-local implicit dependencies
Depends on https://github.com/google/blueprint/pull/78
This uses the new CommandDeps field to move implicit dependencies
embedded in the Command string next to the definition, instead of having
to specify them in every BuildParam struct. This should make it easier
to verify dependencies.
Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
diff --git a/common/glob.go b/common/glob.go
index 152be94..3de18ee 100644
--- a/common/glob.go
+++ b/common/glob.go
@@ -46,6 +46,7 @@
globRule = pctx.StaticRule("globRule",
blueprint.RuleParams{
Command: fmt.Sprintf(`%s -o $out $excludes "$glob"`, globCmd),
+ CommandDeps: []string{globCmd},
Description: "glob $glob",
Restat: true,
@@ -95,9 +96,8 @@
// Create a rule to rebuild fileListFile if a directory in depFile changes. fileListFile
// will only be rewritten if it has changed, preventing unnecesary build.ninja regenerations.
ctx.Build(pctx, blueprint.BuildParams{
- Rule: globRule,
- Outputs: []string{fileListFile},
- Implicits: []string{globCmd},
+ Rule: globRule,
+ Outputs: []string{fileListFile},
Args: map[string]string{
"glob": globPattern,
"excludes": JoinWithPrefixAndQuote(excludes, "-e "),