Make the duplicate header copy warning more explicit
So that it's easier to understand which makefile is actually being used, and which ones are being ignored. Test: manually check the warnings on a device that sets BUILD_BROKEN_DUP_COPY_HEADERS Change-Id: If9e29458eaa655b28e6b770d194d1da867cb8d16
This commit is contained in:
parent
2b526bf7f3
commit
f4249d1052
1 changed files with 9 additions and 3 deletions
|
@ -75,10 +75,16 @@ endef
|
|||
has_dup_copy_headers :=
|
||||
$(foreach dest,$(ALL_COPIED_HEADERS), \
|
||||
$(eval _srcs := $(ALL_COPIED_HEADERS.$(dest).SRC)) \
|
||||
$(eval _src := $(word $(words $(_srcs)),$(_srcs))) \
|
||||
$(eval _src := $(lastword $(_srcs))) \
|
||||
$(if $(call streq,$(_src),$(_srcs)),, \
|
||||
$(warning Duplicate header copy: $(dest)) \
|
||||
$(warning Defined in: $(ALL_COPIED_HEADERS.$(dest).MAKEFILE)) \
|
||||
$(warning _ Using $(_src)) \
|
||||
$(warning __ from $(lastword $(ALL_COPIED_HEADERS.$(dest).MAKEFILE))) \
|
||||
$(eval _makefiles := $$(wordlist 1,$(call int_subtract,$(words $(ALL_COPIED_HEADERS.$(dest).MAKEFILE)),1),$$(ALL_COPIED_HEADERS.$$(dest).MAKEFILE))) \
|
||||
$(foreach src,$(wordlist 1,$(call int_subtract,$(words $(_srcs)),1),$(_srcs)), \
|
||||
$(warning _ Ignoring $(src)) \
|
||||
$(warning __ from $(firstword $(_makefiles))) \
|
||||
$(eval _makefiles := $$(wordlist 2,9999,$$(_makefiles)))) \
|
||||
$(eval has_dup_copy_headers := true)) \
|
||||
$(eval $(call copy-one-header,$(_src),$(dest))))
|
||||
all_copied_headers: $(ALL_COPIED_HEADERS)
|
||||
|
|
Loading…
Reference in a new issue