From 5aac3629493e4df7a1e7d2b594021c380d25141f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 31 Aug 2017 15:07:09 -0700 Subject: [PATCH] Add notice property to all modules Add a notice property to all modules which, if set, propagates to LOCAL_NOTICE_FILE in make. Test: m -j checkbuild, examine out/soong/Android*.mk Change-Id: I565a5624dfd7b376b976b1a43dac5cea96869026 --- android/androidmk.go | 3 +++ android/module.go | 3 +++ androidmk/cmd/androidmk/android.go | 1 + 3 files changed, 7 insertions(+) diff --git a/android/androidmk.go b/android/androidmk.go index 46e7fcf20..9e541febd 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -232,6 +232,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b if amod.commonProperties.Owner != nil { fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner) } + if amod.commonProperties.Notice != nil { + fmt.Fprintln(&data.preamble, "LOCAL_NOTICE_FILE :=", *amod.commonProperties.Notice) + } } if host { diff --git a/android/module.go b/android/module.go index fb2e70305..bacf66634 100644 --- a/android/module.go +++ b/android/module.go @@ -162,6 +162,9 @@ type commonProperties struct { // names of other modules to install if this module is installed Required []string `android:"arch_variant"` + // relative path to a file to include in the list of notices for the device + Notice *string + // Set by TargetMutator CompileTarget Target `blueprint:"mutated"` CompilePrimary bool `blueprint:"mutated"` diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index ee722e01d..50ba91ba5 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -74,6 +74,7 @@ func init() { "LOCAL_PROTOC_OPTIMIZE_TYPE": "proto.type", "LOCAL_MODULE_OWNER": "owner", "LOCAL_RENDERSCRIPT_TARGET_API": "renderscript.target_api", + "LOCAL_NOTICE_FILE": "notice", }) addStandardProperties(bpparser.ListType, map[string]string{