Fix copy+paste error
Fix declare-copy-target-license-metadata Test: m droid reportmissinglicenses Change-Id: I5c8ee1109f9b83232bf66218d44ed05f97377a98
This commit is contained in:
@@ -595,12 +595,10 @@ endef
|
|||||||
## license metadata.
|
## license metadata.
|
||||||
###########################################################
|
###########################################################
|
||||||
define declare-copy-target-license-metadata
|
define declare-copy-target-license-metadata
|
||||||
$(strip $(if $(filter $(OUT_DIR)%,$(2)),$(eval _dir:=$(call license-metadata-dir,$(1)))\
|
$(strip $(if $(filter $(OUT_DIR)%,$(2)),\
|
||||||
$(eval _tgt:=$(strip $(1)))\
|
$(eval _tgt:=$(strip $(1)))\
|
||||||
$(eval _meta := $(call append-path,$(_dir),$(patsubst $(OUT_DIR)%,out%,$(_tgt).meta_lic)))\
|
|
||||||
$(eval ALL_COPIED_TARGETS.$(_tgt).SOURCES := $(ALL_COPIED_TARGETS.$(_tgt).SOURCES) $(filter $(OUT_DIR)%,$(2)))\
|
$(eval ALL_COPIED_TARGETS.$(_tgt).SOURCES := $(ALL_COPIED_TARGETS.$(_tgt).SOURCES) $(filter $(OUT_DIR)%,$(2)))\
|
||||||
$(eval ALL_COPIED_TARGETS += $(_tgt)),\
|
$(eval ALL_COPIED_TARGETS += $(_tgt))))
|
||||||
$(eval ALL_TARGETS.$(1).META_LIC:=$(module_license_metadata))))
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
@@ -746,11 +744,10 @@ $(strip $(eval ALL_TARGETS.$(1).META_LIC:=$(_meta)))
|
|||||||
$(strip $(eval _dep:=))
|
$(strip $(eval _dep:=))
|
||||||
$(strip $(foreach s,$(ALL_COPIED_TARGETS.$(1).SOURCES),\
|
$(strip $(foreach s,$(ALL_COPIED_TARGETS.$(1).SOURCES),\
|
||||||
$(eval _dmeta:=$(ALL_TARGETS.$(s).META_LIC))\
|
$(eval _dmeta:=$(ALL_TARGETS.$(s).META_LIC))\
|
||||||
$(if $(filter 0p,$(_dmeta)),\
|
$(if $(filter-out 0p,$(_dep)),\
|
||||||
$(if $(filter-out 0p,$(_dep)),,$(eval ALL_TARGETS.$(1).META_LIC:=0p)),\
|
$(if $(filter-out $(_dep),$(_dmeta)),$(error cannot copy target from multiple modules: $(1) from $(_dep) and $(_dmeta))),\
|
||||||
$(if $(_dep),\
|
$(eval _dep:=$(_dmeta)))))
|
||||||
$(if $(filter-out $(_dep),$(_dmeta)),$(error cannot copy target from multiple modules: $(1) from $(_dep) and $(_dmeta))),
|
$(if $(filter 0p,$(_dep)),$(eval ALL_TARGETS.$(1).META_LIC:=0p))
|
||||||
$(eval _dep:=$(_dmeta))))))
|
|
||||||
$(strip $(if $(strip $(_dep)),,$(error cannot copy target from unknown module: $(1) from $(ALL_COPIED_TARGETS.$(1).SOURCES))))
|
$(strip $(if $(strip $(_dep)),,$(error cannot copy target from unknown module: $(1) from $(ALL_COPIED_TARGETS.$(1).SOURCES))))
|
||||||
|
|
||||||
ifneq (0p,$(ALL_TARGETS.$(1).META_LIC))
|
ifneq (0p,$(ALL_TARGETS.$(1).META_LIC))
|
||||||
@@ -772,6 +769,11 @@ $(_meta) : $(_dep) $(COPY_LICENSE_METADATA)
|
|||||||
-o $$@
|
-o $$@
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$(eval _dep:=)
|
||||||
|
$(eval _dmeta:=)
|
||||||
|
$(eval _meta:=)
|
||||||
|
$(eval _dir:=)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
Reference in New Issue
Block a user