Revert "Rough-in license metadata support to make."
Revert "Export soong license data to make." Revert "Add ability to declare licenses in soong." Revert submission 1377717-metalics Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442 Reverted Changes: I26ac54ca9:Define the standard license_kind rules. I656486070:Export soong license data to make. If9d661dfc:Export soong license data to make. I97943de53:Add ability to declare licenses in soong. Icaff40171:Rough-in license metadata support to make. Ib8e538bd0:Add variables for notice deps, license kinds etc. Change-Id: Iaf2243cba16f6191b022371a14f81ef8194a47d1
This commit is contained in:
@@ -565,55 +565,6 @@ $(strip \
|
||||
)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Target directory for license metadata files.
|
||||
###########################################################
|
||||
define license-metadata-dir
|
||||
$(call generated-sources-dir-for,META,lic,)
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## License metadata build rule for my_register_name $1
|
||||
###########################################################
|
||||
define license-metadata-rule
|
||||
$(strip $(eval _dir := $(call license-metadata-dir)))
|
||||
$(strip $(eval _deps := $(sort $(filter-out $(_dir)/$(1).meta_lic,$(foreach d,$(ALL_MODULES.$(1).NOTICE_DEPS), $(_dir)/$(d).meta_lic)))))
|
||||
$(foreach b,$(sort $(ALL_MODULES.$(1).BUILT) $(ALL_MODULES.$(1).INSTALLED)),
|
||||
$(_dir)/$(b).meta_module ::
|
||||
mkdir -p $$(dir $$@)
|
||||
echo $(_dir)/$(1).meta_lic >> $$@
|
||||
sort -u $$@ -o $$@
|
||||
|
||||
)
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_KINDS := $(sort $(ALL_MODULES.$(1).LICENSE_KINDS))
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_CONDITIONS := $(sort $(ALL_MODULES.$(1).LICENSE_CONDITIONS))
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_NOTICES := $(sort $(ALL_MODULES.$(1).NOTICES))
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_NOTICE_DEPS := $(_deps)
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_TARGETS := $(sort $(ALL_MODULES.$(1).BUILT) $(ALL_MODULES.$(1).INSTALLED))
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_IS_CONTAINER := $(sort $(ALL_MODULES.$(1).IS_CONTAINER))
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_PACKAGE_NAME := $(ALL_MODULES.$(1).LICENSE_PACKAGE_NAME)
|
||||
$(_dir)/$(1).meta_lic: PRIVATE_INSTALL_MAP := $(sort $(ALL_MODULES.$(1).LICENSE_INSTALL_MAP))
|
||||
$(_dir)/$(1).meta_lic : $(_deps) $(ALL_MODULES.$(1).NOTICES) $(foreach b,$(sort $(ALL_MODULES.$(1).BUILT) $(ALL_MODULES.$(1).INSTALLED)), $(_dir)/$(b).meta_module) build/make/tools/build-license-metadata.sh
|
||||
rm -f $$@
|
||||
mkdir -p $$(dir $$@)
|
||||
build/make/tools/build-license-metadata.sh -k $$(PRIVATE_KINDS) -c $$(PRIVATE_CONDITIONS) -n $$(PRIVATE_NOTICES) -d $$(PRIVATE_NOTICE_DEPS) -m $$(PRIVATE_INSTALL_MAP) -t $$(PRIVATE_TARGETS) $$(if $$(filter-out false,$$(PRIVATE_IS_CONTAINER)),-is_container) -p $$(PRIVATE_PACKAGE_NAME) -o $$@
|
||||
|
||||
$(1) : $(_dir)/$(1).meta_lic
|
||||
|
||||
$(if $(ALL_MODULES.$(1).INSTALLED_NOTICE_FILE),$(ALL_MODULES.$(1).INSTALLED_NOTICE_FILE) : $(_dir)/$(1).meta_lic)
|
||||
|
||||
.PHONY: $(1).meta_lic
|
||||
$(1).meta_lic : $(_dir)/$(1).meta_lic
|
||||
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Declares a license metadata build rule for ALL_MODULES
|
||||
###########################################################
|
||||
define build-license-metadata
|
||||
$(foreach m,$(ALL_MODULES),$(eval $(call license-metadata-rule,$(m))))
|
||||
endef
|
||||
|
||||
###########################################################
|
||||
## Returns correct _idfPrefix from the list:
|
||||
## { HOST, HOST_CROSS, TARGET }
|
||||
|
@@ -1404,16 +1404,8 @@ modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
|
||||
ALL_DEFAULT_INSTALLED_MODULES :=
|
||||
|
||||
|
||||
# Some notice deps refer to module names without prefix or arch suffix where
|
||||
# only the variants with them get built.
|
||||
# fix-notice-deps replaces those unadorned module names with every built variant.
|
||||
$(call fix-notice-deps)
|
||||
|
||||
# Create a license metadata rule per module. Could happen in base_rules.mk or
|
||||
# notice_files.mk; except, it has to happen after fix-notice-deps to avoid
|
||||
# missing dependency errors.
|
||||
$(call build-license-metadata)
|
||||
|
||||
|
||||
# These are additional goals that we build, in order to make sure that there
|
||||
# is as little code as possible in the tree that doesn't build.
|
||||
|
@@ -167,6 +167,8 @@ else
|
||||
# Soong produces uninstallable *.sdk shared libraries for embedding in APKs.
|
||||
module_installed_filename := \
|
||||
$(patsubst $(PRODUCT_OUT)/%,%,$($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)OUT_SHARED_LIBRARIES))/$(notdir $(LOCAL_BUILT_MODULE))
|
||||
else
|
||||
$(error Cannot determine where to install NOTICE file for $(LOCAL_MODULE))
|
||||
endif # JAVA_LIBRARIES
|
||||
endif # STATIC_LIBRARIES
|
||||
endif
|
||||
@@ -184,12 +186,11 @@ ALL_MODULES.$(my_register_name).INSTALLED_NOTICE_FILE := $(installed_notice_file
|
||||
endif
|
||||
|
||||
$(installed_notice_file): PRIVATE_INSTALLED_MODULE := $(module_installed_filename)
|
||||
$(installed_notice_file) : PRIVATE_NOTICES := $(notice_file)
|
||||
|
||||
$(installed_notice_file): $(notice_file)
|
||||
@echo Notice file: $< -- $@
|
||||
$(hide) mkdir -p $(dir $@)
|
||||
$(hide) awk 'FNR==1 && NR > 1 {print "\n"} {print}' $(PRIVATE_NOTICES) > $@
|
||||
$(hide) awk 'FNR==1 && NR > 1 {print "\n"} {print}' $^ > $@
|
||||
|
||||
ifdef LOCAL_INSTALLED_MODULE
|
||||
# Make LOCAL_INSTALLED_MODULE depend on NOTICE files if they exist
|
||||
|
Reference in New Issue
Block a user