diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-11-17 15:27:28 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-11-17 19:05:07 -0800 |
commit | c94a768a2a6998a34f76212912ce4013a7be47f5 (patch) | |
tree | 0420066908ab1d2efaa14953a2a84282c18f4b33 /common | |
parent | 322a0a6b59dfe5d059b7075cd033dc0bcb49dc13 (diff) | |
download | build_soong-c94a768a2a6998a34f76212912ce4013a7be47f5.tar.gz build_soong-c94a768a2a6998a34f76212912ce4013a7be47f5.tar.bz2 build_soong-c94a768a2a6998a34f76212912ce4013a7be47f5.zip |
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
Diffstat (limited to 'common')
-rw-r--r-- | common/defs.go | 1 | ||||
-rw-r--r-- | common/glob.go | 6 | ||||
-rw-r--r-- | common/module.go | 9 |
3 files changed, 8 insertions, 8 deletions
diff --git a/common/defs.go b/common/defs.go index 0001ce1b..67fcb1f3 100644 --- a/common/defs.go +++ b/common/defs.go @@ -33,6 +33,7 @@ var ( androidbp = pctx.StaticRule("androidbp", blueprint.RuleParams{ Command: androidbpCmd + " ${srcDir}/Android.bp $in $out", + CommandDeps: []string{androidbpCmd}, Description: "androidbp $out", }) diff --git a/common/glob.go b/common/glob.go index 152be94e..3de18eef 100644 --- a/common/glob.go +++ b/common/glob.go @@ -46,6 +46,7 @@ var ( 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 @@ func GlobRule(ctx globContext, globPattern string, excludes []string, // 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 "), diff --git a/common/module.go b/common/module.go index cb38513c..33a801fe 100644 --- a/common/module.go +++ b/common/module.go @@ -570,11 +570,10 @@ func (c *buildTargetSingleton) GenerateBuildActions(ctx blueprint.SingletonConte transMk := filepath.Join("androidmk", "Android_"+strings.Replace(filepath.Dir(origBp), "/", "_", -1)+".mk") ctx.Build(pctx, blueprint.BuildParams{ - Rule: androidbp, - Outputs: []string{transMk}, - Inputs: []string{bpFile}, - Implicits: []string{androidbpCmd}, - Optional: true, + Rule: androidbp, + Outputs: []string{transMk}, + Inputs: []string{bpFile}, + Optional: true, }) androidMks = append(androidMks, transMk) |