Loading phony/phony.go +8 −4 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import ( "strings" "android/soong/android" "github.com/google/blueprint/proptools" ) func init() { Loading Loading @@ -88,6 +90,7 @@ type PhonyRule struct { android.ModuleBase android.DefaultableModuleBase phonyDepsModuleNames []string properties PhonyProperties } Loading @@ -95,7 +98,7 @@ type PhonyProperties struct { // The Phony_deps is the set of all dependencies for this target, // and it can function similarly to .PHONY in a makefile. // Additionally, dependencies within it can even include genrule. Phony_deps []string Phony_deps proptools.Configurable[[]string] } // The phony_rule provides functionality similar to the .PHONY in a makefile. Loading @@ -109,13 +112,14 @@ func PhonyRuleFactory() android.Module { } func (p *PhonyRule) GenerateAndroidBuildActions(ctx android.ModuleContext) { p.phonyDepsModuleNames = p.properties.Phony_deps.GetOrDefault(p.ConfigurableEvaluator(ctx), nil) } func (p *PhonyRule) AndroidMk() android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { if len(p.properties.Phony_deps) > 0 { depModulesStr := strings.Join(p.properties.Phony_deps, " ") if len(p.phonyDepsModuleNames) > 0 { depModulesStr := strings.Join(p.phonyDepsModuleNames, " ") fmt.Fprintln(w, ".PHONY:", name) fmt.Fprintln(w, name, ":", depModulesStr) } Loading Loading
phony/phony.go +8 −4 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import ( "strings" "android/soong/android" "github.com/google/blueprint/proptools" ) func init() { Loading Loading @@ -88,6 +90,7 @@ type PhonyRule struct { android.ModuleBase android.DefaultableModuleBase phonyDepsModuleNames []string properties PhonyProperties } Loading @@ -95,7 +98,7 @@ type PhonyProperties struct { // The Phony_deps is the set of all dependencies for this target, // and it can function similarly to .PHONY in a makefile. // Additionally, dependencies within it can even include genrule. Phony_deps []string Phony_deps proptools.Configurable[[]string] } // The phony_rule provides functionality similar to the .PHONY in a makefile. Loading @@ -109,13 +112,14 @@ func PhonyRuleFactory() android.Module { } func (p *PhonyRule) GenerateAndroidBuildActions(ctx android.ModuleContext) { p.phonyDepsModuleNames = p.properties.Phony_deps.GetOrDefault(p.ConfigurableEvaluator(ctx), nil) } func (p *PhonyRule) AndroidMk() android.AndroidMkData { return android.AndroidMkData{ Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) { if len(p.properties.Phony_deps) > 0 { depModulesStr := strings.Join(p.properties.Phony_deps, " ") if len(p.phonyDepsModuleNames) > 0 { depModulesStr := strings.Join(p.phonyDepsModuleNames, " ") fmt.Fprintln(w, ".PHONY:", name) fmt.Fprintln(w, name, ":", depModulesStr) } Loading