Define Soong phony rules in Make
To support dist-for-goals in Soong, we need to define all phony rules
in Make so that dist-for-goals can insert additional dependencies on
them. Collect all the phony rules in phonySingleton and write them
out as Make rules when Soong is embedded in Make, or as blueprint.Phony
rules when Soong is run standalone.
Bug: 153485543
Test: m checkbuild
Change-Id: I68201eff30744b0f487fc4f11f033767b53a627d
Merged-In: I68201eff30744b0f487fc4f11f033767b53a627d
(cherry picked from commit c3d87d3112
)
This commit is contained in:
@@ -36,6 +36,12 @@ type SingletonContext interface {
|
||||
Variable(pctx PackageContext, name, value string)
|
||||
Rule(pctx PackageContext, name string, params blueprint.RuleParams, argNames ...string) blueprint.Rule
|
||||
Build(pctx PackageContext, params BuildParams)
|
||||
|
||||
// Phony creates a Make-style phony rule, a rule with no commands that can depend on other
|
||||
// phony rules or real files. Phony can be called on the same name multiple times to add
|
||||
// additional dependencies.
|
||||
Phony(name string, deps ...Path)
|
||||
|
||||
RequireNinjaVersion(major, minor, micro int)
|
||||
|
||||
// SetNinjaBuildDir sets the value of the top-level "builddir" Ninja variable
|
||||
@@ -156,6 +162,10 @@ func (s *singletonContextAdaptor) Build(pctx PackageContext, params BuildParams)
|
||||
|
||||
}
|
||||
|
||||
func (s *singletonContextAdaptor) Phony(name string, deps ...Path) {
|
||||
addPhony(s.Config(), name, deps...)
|
||||
}
|
||||
|
||||
func (s *singletonContextAdaptor) SetNinjaBuildDir(pctx PackageContext, value string) {
|
||||
s.SingletonContext.SetNinjaBuildDir(pctx.PackageContext, value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user