From 72f1849c71da9e10e4adf00351d7498f66aaba83 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 30 Oct 2020 16:34:45 +0000 Subject: [PATCH] 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 --- genrule/genrule.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/genrule/genrule.go b/genrule/genrule.go index b09c195fc..53b9dbeb2 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -561,13 +561,12 @@ func (g *Module) IDEInfo(dpInfo *android.IdeInfo) { 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) {