Remove AndroidMkExtraFootersFunc entries param.
I added in case anyone needs to access AndroidMkEntries to generate footer lines, but nobody uses it, and it only confuses people. Test: m nothing, TreeHugger Change-Id: Ic8a450e3c306d9228c1fdec212c7441bd6aaee03
This commit is contained in:
parent
2ba87f466c
commit
02b11a6035
|
@ -141,7 +141,7 @@ type AndroidMkEntries struct {
|
|||
}
|
||||
|
||||
type AndroidMkExtraEntriesFunc func(entries *AndroidMkEntries)
|
||||
type AndroidMkExtraFootersFunc func(w io.Writer, name, prefix, moduleDir string, entries *AndroidMkEntries)
|
||||
type AndroidMkExtraFootersFunc func(w io.Writer, name, prefix, moduleDir string)
|
||||
|
||||
// Utility funcs to manipulate Android.mk variable entries.
|
||||
|
||||
|
@ -554,7 +554,7 @@ func (a *AndroidMkEntries) fillInEntries(config Config, bpPath string, mod bluep
|
|||
fmt.Fprintln(&a.footer, "include "+a.Include)
|
||||
blueprintDir := filepath.Dir(bpPath)
|
||||
for _, footerFunc := range a.ExtraFooters {
|
||||
footerFunc(&a.footer, name, prefix, blueprintDir, a)
|
||||
footerFunc(&a.footer, name, prefix, blueprintDir)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ func (p *makefileGoal) AndroidMkEntries() []AndroidMkEntries {
|
|||
Class: "ETC",
|
||||
OutputFile: OptionalPathForPath(p.outputFilePath),
|
||||
ExtraFooters: []AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
// Can't use Cp because inputPath() is not a valid Path.
|
||||
fmt.Fprintf(w, "$(eval $(call copy-one-file,%s,%s))\n", proptools.String(p.inputPath()), p.outputFilePath)
|
||||
},
|
||||
|
|
|
@ -130,7 +130,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
if c.Properties.IsSdkVariant && c.Properties.SdkAndPlatformVariantVisibleToMake &&
|
||||
c.CcLibraryInterface() && c.Shared() {
|
||||
// Using the SDK variant as a JNI library needs a copy of the .so that
|
||||
|
@ -296,7 +296,7 @@ func (library *libraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries
|
|||
func (object *objectLinker) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
|
||||
entries.Class = "STATIC_LIBRARIES"
|
||||
entries.ExtraFooters = append(entries.ExtraFooters,
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
out := entries.OutputFile.Path()
|
||||
varname := fmt.Sprintf("SOONG_%sOBJECT_%s%s", prefix, name, entries.SubName)
|
||||
|
||||
|
@ -574,7 +574,7 @@ func (c *snapshotObjectLinker) AndroidMkEntries(ctx AndroidMkContext, entries *a
|
|||
}
|
||||
|
||||
entries.ExtraFooters = append(entries.ExtraFooters,
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
out := entries.OutputFile.Path()
|
||||
varname := fmt.Sprintf("SOONG_%sOBJECT_%s%s", prefix, name, entries.SubName)
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
fmt.Fprintln(w, "jar_installed_module := $(LOCAL_INSTALLED_MODULE)")
|
||||
},
|
||||
},
|
||||
|
@ -289,7 +289,7 @@ func (binary *Binary) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
// Ensure that the wrapper script timestamp is always updated when the jar is updated
|
||||
fmt.Fprintln(w, "$(LOCAL_INSTALLED_MODULE): $(jar_installed_module)")
|
||||
fmt.Fprintln(w, "jar_installed_module :=")
|
||||
|
@ -393,7 +393,7 @@ func (app *AndroidApp) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
if app.noticeOutputs.Merged.Valid() {
|
||||
fmt.Fprintf(w, "$(call dist-for-goals,%s,%s:%s)\n",
|
||||
app.installApkName, app.noticeOutputs.Merged.String(), app.installApkName+"_NOTICE")
|
||||
|
@ -548,7 +548,7 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
},
|
||||
},
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
if dstubs.apiFile != nil {
|
||||
fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name())
|
||||
fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.apiFile)
|
||||
|
|
|
@ -260,7 +260,7 @@ func (r *robolectricTest) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
entries := &entriesList[0]
|
||||
|
||||
entries.ExtraFooters = []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
if s := r.robolectricProperties.Test_options.Shards; s != nil && *s > 1 {
|
||||
numShards := int(*s)
|
||||
shardSize := (len(r.tests) + numShards - 1) / numShards
|
||||
|
|
|
@ -311,7 +311,7 @@ func (s *sdk) AndroidMkEntries() []android.AndroidMkEntries {
|
|||
DistFiles: android.MakeDefaultDistFiles(s.snapshotFile.Path()),
|
||||
Include: "$(BUILD_PHONY_PACKAGE)",
|
||||
ExtraFooters: []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
// Allow the sdk to be built by simply passing its name on the command line.
|
||||
fmt.Fprintln(w, ".PHONY:", s.Name())
|
||||
fmt.Fprintln(w, s.Name()+":", s.snapshotFile.String())
|
||||
|
|
Loading…
Reference in New Issue