Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcfb9c5e authored by Jerome Gaillard's avatar Jerome Gaillard
Browse files

Revert "Add variables for notice deps, license kinds etc."

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: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
parent 54066744
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -159,10 +159,6 @@ LOCAL_JNI_SHARED_LIBRARIES_ABI:=
LOCAL_CERTIFICATE_LINEAGE:=
LOCAL_CERTIFICATE_LINEAGE:=
LOCAL_LDFLAGS:=
LOCAL_LDFLAGS:=
LOCAL_LDLIBS:=
LOCAL_LDLIBS:=
LOCAL_LICENSE_CONDITIONS:=
LOCAL_LICENSE_KINDS:=
LOCAL_LICENSE_INSTALL_MAP:=
LOCAL_LICENSE_PACKAGE_NAME:=
LOCAL_LOGTAGS_FILES:=
LOCAL_LOGTAGS_FILES:=
LOCAL_MANIFEST_FILE:=
LOCAL_MANIFEST_FILE:=
LOCAL_MANIFEST_INSTRUMENTATION_FOR:=
LOCAL_MANIFEST_INSTRUMENTATION_FOR:=
@@ -174,7 +170,6 @@ LOCAL_MODULE_HOST_ARCH:=
LOCAL_MODULE_HOST_ARCH_WARN:=
LOCAL_MODULE_HOST_ARCH_WARN:=
LOCAL_MODULE_HOST_CROSS_ARCH:=
LOCAL_MODULE_HOST_CROSS_ARCH:=
LOCAL_MODULE_HOST_OS:=
LOCAL_MODULE_HOST_OS:=
LOCAL_MODULE_IS_CONTAINER:=
LOCAL_MODULE_OWNER:=
LOCAL_MODULE_OWNER:=
LOCAL_MODULE_PATH:=
LOCAL_MODULE_PATH:=
LOCAL_MODULE_RELATIVE_PATH :=
LOCAL_MODULE_RELATIVE_PATH :=
+0 −41
Original line number Original line Diff line number Diff line
@@ -524,47 +524,6 @@ define reverse-list
$(if $(1),$(call reverse-list,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
$(if $(1),$(call reverse-list,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
endef
endef


###########################################################
## Sometimes a notice dependency will reference an unadorned
## module name that only appears in ALL_MODULES adorned with
## an ARCH suffix or a `host_cross_` prefix.
##
## After all of the modules are processed in base_rules.mk,
## replace all such dependencies with every matching adorned
## module name.
###########################################################

define fix-notice-deps
$(strip \
  $(eval _all_module_refs := \
    $(sort \
      $(foreach m,$(sort $(ALL_MODULES)), \
        $(ALL_MODULES.$(m).NOTICE_DEPS) \
      ) \
    ) \
  ) \
  $(foreach m, $(_all_module_refs), \
    $(eval _lookup.$(m) := \
      $(sort \
        $(if $(strip $(ALL_MODULES.$(m).PATH)), \
          $(m), \
          $(filter $(m)_32 $(m)_64 host_cross_$(m) host_cross_$(m)_32 host_cross_$(m)_64, $(ALL_MODULES)) \
        ) \
      ) \
    ) \
  ) \
  $(foreach m, $(ALL_MODULES), \
    $(eval ALL_MODULES.$(m).NOTICE_DEPS := \
      $(sort \
         $(foreach d,$(ALL_MODULES.$(m).NOTICE_DEPS), \
           $(_lookup.$(d)) \
        ) \
      ) \
    ) \
  ) \
)
endef

###########################################################
###########################################################
## Returns correct _idfPrefix from the list:
## Returns correct _idfPrefix from the list:
##   { HOST, HOST_CROSS, TARGET }
##   { HOST, HOST_CROSS, TARGET }
+0 −3
Original line number Original line Diff line number Diff line
@@ -1404,9 +1404,6 @@ modules_to_install := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
ALL_DEFAULT_INSTALLED_MODULES :=
ALL_DEFAULT_INSTALLED_MODULES :=




$(call fix-notice-deps)


# These are additional goals that we build, in order to make sure that there
# 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.
# is as little code as possible in the tree that doesn't build.
modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
modules_to_check := $(foreach m,$(ALL_MODULES),$(ALL_MODULES.$(m).CHECKED))
+1 −85
Original line number Original line Diff line number Diff line
@@ -9,32 +9,6 @@ else
notice_file:=$(strip $(wildcard $(LOCAL_PATH)/LICENSE $(LOCAL_PATH)/LICENCE $(LOCAL_PATH)/NOTICE))
notice_file:=$(strip $(wildcard $(LOCAL_PATH)/LICENSE $(LOCAL_PATH)/LICENCE $(LOCAL_PATH)/NOTICE))
endif
endif


ifneq (,$(strip $(LOCAL_LICENSE_PACKAGE_NAME)))
license_package_name:=$(strip $(LOCAL_LICENSE_PACKAGE_NAME))
else ifdef my_register_name
license_package_name:=$(my_register_name)
else
license_package_name:=$(strip $(LOCAL_MODULE))
endif

ifneq (,$(strip $(LOCAL_LICENSE_INSTALL_MAP)))
install_map:=$(strip $(LOCAL_LICENSE_INSTALL_MAP))
else
install_map:=
endif

ifneq (,$(strip $(LOCAL_LICENSE_KINDS)))
license_kinds:=$(strip $(LOCAL_LICENSE_KINDS))
else
license_kinds:=legacy_by_exception_only
endif

ifneq (,$(strip $(LOCAL_LICENSE_CONDITIONS)))
license_conditions:=$(strip $(LOCAL_LICENSE_CONDITIONS))
else
license_conditions:=by_exception_only
endif

ifeq ($(LOCAL_MODULE_CLASS),GYP)
ifeq ($(LOCAL_MODULE_CLASS),GYP)
  # We ignore NOTICE files for modules of type GYP.
  # We ignore NOTICE files for modules of type GYP.
  notice_file :=
  notice_file :=
@@ -66,64 +40,10 @@ endif


installed_notice_file :=
installed_notice_file :=


is_container:=$(strip $(LOCAL_MODULE_IS_CONTAINER))
ifeq (,$(is_container))
ifneq (,$(strip $(filter %.zip %.tar %.tgz %.tar.gz %.apk %.img %.srcszip %.apex, $(LOCAL_BUILT_MODULE))))
is_container:=true
else
is_container:=false
endif
else ifneq (,$(strip $(filter-out true false,$(is_container))))
$(error Unrecognized value '$(is_container)' for LOCAL_MODULE_IS_CONTAINER)
endif

ifeq (true,$(is_container))
# Include shared libraries' notices for "container" types, but not for binaries etc.
notice_deps := \
    $(sort \
        $(LOCAL_REQUIRED_MODULES) \
        $(LOCAL_STATIC_LIBRARIES) \
        $(LOCAL_WHOLE_STATIC_LIBRARIES) \
        $(LOCAL_SHARED_LIBRARIES) \
        $(LOCAL_DYLIB_LIBRARIES) \
        $(LOCAL_RLIB_LIBRARIES) \
        $(LOCAL_PROC_MACRO_LIBRARIES) \
        $(LOCAL_HEADER_LIBRARIES) \
        $(LOCAL_STATIC_JAVA_LIBRARIES) \
        $(LOCAL_JAVA_LIBRARIES) \
        $(LOCAL_JNI_SHARED_LIBRARIES) \
    )
else
notice_deps := \
    $(sort \
        $(LOCAL_REQUIRED_MODULES) \
        $(LOCAL_STATIC_LIBRARIES) \
        $(LOCAL_WHOLE_STATIC_LIBRARIES) \
        $(LOCAL_RLIB_LIBRARIES) \
        $(LOCAL_PROC_MACRO_LIBRARIES) \
        $(LOCAL_HEADER_LIBRARIES) \
        $(LOCAL_STATIC_JAVA_LIBRARIES) \
    )
endif
ifeq ($(LOCAL_IS_HOST_MODULE),true)
notice_deps := $(sort $(notice_deps) $(LOCAL_HOST_REQUIRED_MODULES))
else
notice_deps := $(sort $(notice_deps) $(LOCAL_TARGET_REQUIRED_MODULES))
endif

ifdef my_register_name
ALL_MODULES.$(my_register_name).LICENSE_PACKAGE_NAME := $(strip $(license_package_name))
ALL_MODULES.$(my_register_name).LICENSE_KINDS := $(sort $(ALL_MODULES.$(my_register_name).LICENSE_KINDS) $(license_kinds))
ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS := $(sort $(ALL_MODULES.$(my_register_name).LICENSE_CONDITIONS) $(license_conditions))
ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP := $(sort $(ALL_MODULES.$(my_register_name).LICENSE_INSTALL_MAP) $(install_map))
ALL_MODULES.$(my_register_name).NOTICE_DEPS := $(sort $(ALL_MODULES.$(my_register_name).NOTICE_DEPS) $(notice_deps))
ALL_MODULES.$(my_register_name).IS_CONTAINER := $(sort $(ALL_MODULES.$(my_register_name).IS_CONTAINER) $(is_container))
endif

ifdef notice_file
ifdef notice_file


ifdef my_register_name
ifdef my_register_name
ALL_MODULES.$(my_register_name).NOTICES := $(sort $(ALL_MODULES.$(my_register_name).NOTICES) $(notice_file))
ALL_MODULES.$(my_register_name).NOTICES := $(ALL_MODULES.$(my_register_name).NOTICES) $(notice_file)
endif
endif


# This relies on the name of the directory in PRODUCT_OUT matching where
# This relies on the name of the directory in PRODUCT_OUT matching where
@@ -181,10 +101,6 @@ module_installed_filename := $(patsubst $(HOST_CROSS_OUT)/%,%,$(module_installed


installed_notice_file := $($(my_prefix)OUT_NOTICE_FILES)/src/$(module_installed_filename).txt
installed_notice_file := $($(my_prefix)OUT_NOTICE_FILES)/src/$(module_installed_filename).txt


ifdef my_register_name
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_INSTALLED_MODULE := $(module_installed_filename)


$(installed_notice_file): $(notice_file)
$(installed_notice_file): $(notice_file)