From 76c7d68ed99f44354a8e6af1ec494ca14abb20a5 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Tue, 22 Dec 2015 14:34:09 +0000 Subject: [PATCH] Allow modules to override the default NOTICE file. It's useful in projects where different top level modules have different licenses associated with them. (cherry picked from commit 3026f4daf11b2d4729559d49624e748a82f15495) Change-Id: I71b20d6f979c0f50562f4f44b2af1f3ec2909444 --- core/clear_vars.mk | 1 + core/notice_files.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 6cf344f29..49e56c4cb 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -187,6 +187,7 @@ LOCAL_SANITIZE_RECOVER:= LOCAL_DBUS_PROXY_PREFIX:= LOCAL_INIT_RC:= LOCAL_MODULE_HOST_OS:= +LOCAL_NOTICE_FILE:= # arch specific variables LOCAL_SRC_FILES_$(TARGET_ARCH):= diff --git a/core/notice_files.mk b/core/notice_files.mk index cf2dad675..e7f89745b 100644 --- a/core/notice_files.mk +++ b/core/notice_files.mk @@ -2,7 +2,11 @@ ## Track NOTICE files ########################################################### +ifneq ($(LOCAL_NOTICE_FILE),) +notice_file:=$(strip $(LOCAL_NOTICE_FILE)) +else notice_file:=$(strip $(wildcard $(LOCAL_PATH)/NOTICE)) +endif ifeq ($(LOCAL_MODULE_CLASS),GYP) # We ignore NOTICE files for modules of type GYP. -- 2.11.0