aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorJaewoong Jung <jungjw@google.com>2019-08-27 17:33:16 -0700
committerRashed Abdel-Tawab <rashed@linux.com>2019-09-27 20:31:02 -0700
commit88d8316da64e63a7d50dd006eb0807d34ef28f16 (patch)
treed08a301ff516179b17089b956948d3f25c435308 /apex
parentef1167400247f8dcd8418d87cdaaaceb344528b3 (diff)
downloadbuild_soong-88d8316da64e63a7d50dd006eb0807d34ef28f16.tar.gz
build_soong-88d8316da64e63a7d50dd006eb0807d34ef28f16.tar.bz2
build_soong-88d8316da64e63a7d50dd006eb0807d34ef28f16.zip
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
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 383fc23a..93111e6b 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1422,11 +1422,13 @@ func (p *Prebuilt) AndroidMkEntries() android.AndroidMkEntries {
Class: "ETC",
OutputFile: android.OptionalPathForPath(p.inputApex),
Include: "$(BUILD_PREBUILT)",
- AddCustomEntries: func(name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
- entries.SetString("LOCAL_MODULE_PATH", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString()))
- entries.SetString("LOCAL_MODULE_STEM", p.installFilename)
- entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable())
- entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", p.properties.Overrides...)
+ ExtraEntries: []android.AndroidMkExtraEntriesFunc{
+ func(entries *android.AndroidMkEntries) {
+ entries.SetString("LOCAL_MODULE_PATH", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString()))
+ entries.SetString("LOCAL_MODULE_STEM", p.installFilename)
+ entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable())
+ entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", p.properties.Overrides...)
+ },
},
}
}