AndroidMkEntries minor refactoring.
This includes a few changes that make AndroidMkEntries more resemble AndroidMkData, especially in terms of how extra entries are added. Most importantly it can now have multiple custom functions. Test: Soong tests Change-Id: Ibf9102624d16d0c1c9894a2794fc7c797bb34c9a
This commit is contained in:
@@ -155,16 +155,18 @@ func (p *PrebuiltEtc) AndroidMkEntries() AndroidMkEntries {
|
||||
Class: "ETC",
|
||||
SubName: nameSuffix,
|
||||
OutputFile: OptionalPathForPath(p.outputFilePath),
|
||||
AddCustomEntries: func(name, prefix, moduleDir string, entries *AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_TAGS", "optional")
|
||||
entries.SetString("LOCAL_MODULE_PATH", "$(OUT_DIR)/"+p.installDirPath.RelPathString())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", p.outputFilePath.Base())
|
||||
entries.SetString("LOCAL_UNINSTALLABLE_MODULE", strconv.FormatBool(!p.Installable()))
|
||||
if p.additionalDependencies != nil {
|
||||
for _, path := range *p.additionalDependencies {
|
||||
entries.SetString("LOCAL_ADDITIONAL_DEPENDENCIES", path.String())
|
||||
ExtraEntries: []AndroidMkExtraEntriesFunc{
|
||||
func(entries *AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_TAGS", "optional")
|
||||
entries.SetString("LOCAL_MODULE_PATH", "$(OUT_DIR)/"+p.installDirPath.RelPathString())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", p.outputFilePath.Base())
|
||||
entries.SetString("LOCAL_UNINSTALLABLE_MODULE", strconv.FormatBool(!p.Installable()))
|
||||
if p.additionalDependencies != nil {
|
||||
for _, path := range *p.additionalDependencies {
|
||||
entries.SetString("LOCAL_ADDITIONAL_DEPENDENCIES", path.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user