summaryrefslogtreecommitdiffstats
path: root/core/base_rules.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-05-20 01:03:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-20 01:03:22 +0000
commit44acba6d37b1d13ef3a3ec6d89e5121f691089d9 (patch)
treea93798d3fb9356ceb4dc4ce8aaf3cd67e978945a /core/base_rules.mk
parent9cf9a6c6dcd9d58024dc115a703feb7bc47098bd (diff)
parent02026edf4d104750fde070862636d29db4124b3a (diff)
downloadbuild-44acba6d37b1d13ef3a3ec6d89e5121f691089d9.zip
build-44acba6d37b1d13ef3a3ec6d89e5121f691089d9.tar.gz
build-44acba6d37b1d13ef3a3ec6d89e5121f691089d9.tar.bz2
am 02026edf: am bf6b82fb: am 247f5c4f: am 1bd15569: am e528e44d: Merge "Add task to print transitive dependencies and their license files." into lmp-dev
* commit '02026edf4d104750fde070862636d29db4124b3a': Add task to print transitive dependencies and their license files.
Diffstat (limited to 'core/base_rules.mk')
-rw-r--r--core/base_rules.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 99107ab..d4c9a06 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -87,6 +87,7 @@ endif
# file, tag the module as "gnu". Search for "*_GPL*", "*_LGPL*" and "*_MPL*"
# so that we can also find files like MODULE_LICENSE_GPL_AND_AFL
#
+license_files := $(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*)
gpl_license_file := $(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL* MODULE_LICENSE*_LGPL*)
ifneq ($(gpl_license_file),)
my_module_tags += gnu
@@ -645,6 +646,21 @@ endif
INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(my_register_name)
+##########################################################
+# Track module-level dependencies.
+# Use $(LOCAL_MODULE) instead of $(my_register_name) to ignore module's bitness.
+ALL_DEPS.MODULES := $(sort $(ALL_DEPS.MODULES) $(LOCAL_MODULE))
+ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS := $(sort \
+ $(ALL_MODULES.$(LOCAL_MODULE).ALL_DEPS) \
+ $(LOCAL_STATIC_LIBRARIES) \
+ $(LOCAL_WHOLE_STATIC_LIBRARIES) \
+ $(LOCAL_SHARED_LIBRARIES) \
+ $(LOCAL_STATIC_JAVA_LIBRARIES) \
+ $(LOCAL_JAVA_LIBRARIES)\
+ $(LOCAL_JNI_SHARED_LIBRARIES))
+
+ALL_DEPS.$(LOCAL_MODULE).LICENSE := $(sort $(ALL_DEPS.$(LOCAL_MODULE).LICENSE) $(license_files))
+
###########################################################
## Take care of my_module_tags
###########################################################