From 2630213418aa7523ffabfd79c8ac9de3dde53767 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 13 May 2016 12:28:46 -0700 Subject: [PATCH] Set LOCAL_PATH for each prebuilt module Set LOCAL_PATH to the path to the blueprint file so that make can generate MODULE-IN-* rules to make mma work. Switch to using LOCAL_PREBUILT_MODULE_FILE instead of LOCAL_SRC_FILES to specify the location of the prebuilts relative to $(TOP). This should also make notice files work. Change-Id: I51c7aa1187e68c4c9095687461dd5e76cbd7292d --- common/androidmk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/androidmk.go b/common/androidmk.go index 6a2ede069..3fe9e9624 100644 --- a/common/androidmk.go +++ b/common/androidmk.go @@ -93,7 +93,6 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext func translateAndroidMk(ctx blueprint.SingletonContext, mkFile string, mods []AndroidModule) error { buf := &bytes.Buffer{} - fmt.Fprintln(buf, "LOCAL_PATH := $(TOP)") fmt.Fprintln(buf, "LOCAL_MODULE_MAKEFILE := $(lastword $(MAKEFILE_LIST))") for _, mod := range mods { @@ -184,10 +183,11 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b } fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)") + fmt.Fprintln(w, "LOCAL_PATH :=", filepath.Dir(ctx.BlueprintFile(mod))) fmt.Fprintln(w, "LOCAL_MODULE :=", name) fmt.Fprintln(w, "LOCAL_MODULE_CLASS :=", data.Class) fmt.Fprintln(w, "LOCAL_MULTILIB :=", amod.commonProperties.Compile_multilib) - fmt.Fprintln(w, "LOCAL_SRC_FILES :=", data.OutputFile.String()) + fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", data.OutputFile.String()) archStr := amod.Arch().ArchType.String() if amod.Host() {