Don't store notice files for Soong modules
Soong modules have already generated their license metadata file, the stored notice file list is not used. Bug: 309006256 Test: no change to out/build-cf_x86_64_phone.ninja Change-Id: I69ab4e3023db7ed42363e4a8eedbd737f237e509
This commit is contained in:
parent
8faa4a5880
commit
acd61f926f
1 changed files with 28 additions and 27 deletions
|
@ -2,6 +2,25 @@
|
||||||
## Track NOTICE files
|
## Track NOTICE files
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
|
module_license_metadata := $(call local-meta-intermediates-dir)/$(my_register_name).meta_lic
|
||||||
|
|
||||||
|
$(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(foreach bi,$(LOCAL_SOONG_BUILT_INSTALLED),$(call word-colon,1,$(bi))),\
|
||||||
|
$(eval ALL_TARGETS.$(target).META_LIC := $(module_license_metadata)))
|
||||||
|
|
||||||
|
$(foreach f,$(my_test_data) $(my_test_config),\
|
||||||
|
$(if $(strip $(ALL_TARGETS.$(call word-colon,1,$(f)).META_LIC)), \
|
||||||
|
$(call declare-copy-target-license-metadata,$(call word-colon,2,$(f)),$(call word-colon,1,$(f))), \
|
||||||
|
$(eval ALL_TARGETS.$(call word-colon,2,$(f)).META_LIC := $(module_license_metadata))))
|
||||||
|
|
||||||
|
ALL_MODULES.$(my_register_name).META_LIC := $(strip $(ALL_MODULES.$(my_register_name).META_LIC) $(module_license_metadata))
|
||||||
|
|
||||||
|
ifdef LOCAL_SOONG_LICENSE_METADATA
|
||||||
|
# Soong modules have already produced a license metadata file, copy it to where Make expects it.
|
||||||
|
$(eval $(call copy-one-license-metadata-file, $(LOCAL_SOONG_LICENSE_METADATA), $(module_license_metadata),$(ALL_MODULES.$(my_register_name).BUILT),$(ALL_MODUES.$(my_register_name).INSTALLED)))
|
||||||
|
else
|
||||||
|
# Make modules don't have enough information to produce a license metadata rule until after fix-notice-deps
|
||||||
|
# has been called, store the necessary information until later.
|
||||||
|
|
||||||
ifneq ($(LOCAL_NOTICE_FILE),)
|
ifneq ($(LOCAL_NOTICE_FILE),)
|
||||||
notice_file:=$(strip $(LOCAL_NOTICE_FILE))
|
notice_file:=$(strip $(LOCAL_NOTICE_FILE))
|
||||||
else
|
else
|
||||||
|
@ -26,25 +45,6 @@ ifdef LOCAL_NO_NOTICE_FILE
|
||||||
notice_file :=
|
notice_file :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
module_license_metadata := $(call local-meta-intermediates-dir)/$(my_register_name).meta_lic
|
|
||||||
|
|
||||||
$(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(foreach bi,$(LOCAL_SOONG_BUILT_INSTALLED),$(call word-colon,1,$(bi))),\
|
|
||||||
$(eval ALL_TARGETS.$(target).META_LIC := $(module_license_metadata)))
|
|
||||||
|
|
||||||
$(foreach f,$(my_test_data) $(my_test_config),\
|
|
||||||
$(if $(strip $(ALL_TARGETS.$(call word-colon,1,$(f)).META_LIC)), \
|
|
||||||
$(call declare-copy-target-license-metadata,$(call word-colon,2,$(f)),$(call word-colon,1,$(f))), \
|
|
||||||
$(eval ALL_TARGETS.$(call word-colon,2,$(f)).META_LIC := $(module_license_metadata))))
|
|
||||||
|
|
||||||
ALL_MODULES.$(my_register_name).META_LIC := $(strip $(ALL_MODULES.$(my_register_name).META_LIC) $(module_license_metadata))
|
|
||||||
|
|
||||||
ifdef LOCAL_SOONG_LICENSE_METADATA
|
|
||||||
# Soong modules have already produced a license metadata file, copy it to where Make expects it.
|
|
||||||
$(eval $(call copy-one-license-metadata-file, $(LOCAL_SOONG_LICENSE_METADATA), $(module_license_metadata),$(ALL_MODULES.$(my_register_name).BUILT),$(ALL_MODUES.$(my_register_name).INSTALLED)))
|
|
||||||
else
|
|
||||||
# Make modules don't have enough information to produce a license metadata rule until after fix-notice-deps
|
|
||||||
# has been called, store the necessary information until later.
|
|
||||||
|
|
||||||
ifneq (,$(strip $(LOCAL_LICENSE_PACKAGE_NAME)))
|
ifneq (,$(strip $(LOCAL_LICENSE_PACKAGE_NAME)))
|
||||||
license_package_name:=$(strip $(LOCAL_LICENSE_PACKAGE_NAME))
|
license_package_name:=$(strip $(LOCAL_LICENSE_PACKAGE_NAME))
|
||||||
else
|
else
|
||||||
|
@ -136,8 +136,9 @@ else
|
||||||
ALL_MODULES.$(my_register_name).NOTICE_DEPS := $(ALL_MODULES.$(my_register_name).NOTICE_DEPS) $(notice_deps)
|
ALL_MODULES.$(my_register_name).NOTICE_DEPS := $(ALL_MODULES.$(my_register_name).NOTICE_DEPS) $(notice_deps)
|
||||||
ALL_MODULES.$(my_register_name).IS_CONTAINER := $(strip $(filter-out false,$(ALL_MODULES.$(my_register_name).IS_CONTAINER) $(is_container)))
|
ALL_MODULES.$(my_register_name).IS_CONTAINER := $(strip $(filter-out false,$(ALL_MODULES.$(my_register_name).IS_CONTAINER) $(is_container)))
|
||||||
ALL_MODULES.$(my_register_name).PATH := $(strip $(ALL_MODULES.$(my_register_name).PATH) $(local_path))
|
ALL_MODULES.$(my_register_name).PATH := $(strip $(ALL_MODULES.$(my_register_name).PATH) $(local_path))
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef notice_file
|
ifdef notice_file
|
||||||
ALL_MODULES.$(my_register_name).NOTICES := $(ALL_MODULES.$(my_register_name).NOTICES) $(notice_file)
|
ALL_MODULES.$(my_register_name).NOTICES := $(ALL_MODULES.$(my_register_name).NOTICES) $(notice_file)
|
||||||
endif # notice_file
|
endif # notice_file
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue