Make genrules uninstallable ETC instead of PHONY
Makes it possible for make modules to depend on genrules via
constructs like $(call intermediates-dir-for,ETC,foo)/foo.
Test: presubmit
Change-Id: Ic9a014f55ea503f1c0c8167f351ecd1407083562
diff --git a/genrule/genrule.go b/genrule/genrule.go
index b09c195..53b9dbe 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -561,13 +561,12 @@
func (g *Module) AndroidMk() android.AndroidMkData {
return android.AndroidMkData{
- Include: "$(BUILD_PHONY_PACKAGE)",
- Class: "FAKE",
+ Class: "ETC",
OutputFile: android.OptionalPathForPath(g.outputFiles[0]),
SubName: g.subName,
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
- fmt.Fprintln(w, "LOCAL_ADDITIONAL_DEPENDENCIES :=", strings.Join(g.outputDeps.Strings(), " "))
+ fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
},
},
Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {