Merge "Add phony target to check all PCF ELF prebuilts"
This commit is contained in:
commit
ad4dae71cf
2 changed files with 19 additions and 5 deletions
|
@ -40,6 +40,10 @@ $(if $(filter true,$(BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES)),, \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Phony target to check PRODUCT_COPY_FILES copy pairs don't contain ELF files
|
||||||
|
.PHONY: check-elf-prebuilt-product-copy-files
|
||||||
|
check-elf-prebuilt-product-copy-files:
|
||||||
|
|
||||||
check_elf_prebuilt_product_copy_files := true
|
check_elf_prebuilt_product_copy_files := true
|
||||||
ifneq (,$(filter true,$(BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES)))
|
ifneq (,$(filter true,$(BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES)))
|
||||||
check_elf_prebuilt_product_copy_files :=
|
check_elf_prebuilt_product_copy_files :=
|
||||||
|
|
|
@ -2493,15 +2493,25 @@ endef
|
||||||
# $(2): destination file
|
# $(2): destination file
|
||||||
# $(3): message to print on error
|
# $(3): message to print on error
|
||||||
define copy-non-elf-file-checked
|
define copy-non-elf-file-checked
|
||||||
$(2): $(1) $(LLVM_READOBJ)
|
$(eval check_non_elf_file_timestamp := \
|
||||||
@echo "Copy non-ELF: $$@"
|
$(call intermediates-dir-for,FAKE,check-non-elf-file-timestamps)/$(2).timestamp)
|
||||||
|
$(check_non_elf_file_timestamp): $(1) $(LLVM_READOBJ)
|
||||||
|
@echo "Check non-ELF: $$<"
|
||||||
|
$(hide) mkdir -p "$$(dir $$@)"
|
||||||
|
$(hide) rm -f "$$@"
|
||||||
$(hide) \
|
$(hide) \
|
||||||
if $(LLVM_READOBJ) -h $$< >/dev/null 2>&1; then \
|
if $(LLVM_READOBJ) -h "$$<" >/dev/null 2>&1; then \
|
||||||
$(call echo-error,$$@,$(3)); \
|
$(call echo-error,$(2),$(3)); \
|
||||||
$(call echo-error,$$@,found ELF file: $$<); \
|
$(call echo-error,$(2),found ELF file: $$<); \
|
||||||
false; \
|
false; \
|
||||||
fi
|
fi
|
||||||
|
$(hide) touch "$$@"
|
||||||
|
|
||||||
|
$(2): $(1) $(check_non_elf_file_timestamp)
|
||||||
|
@echo "Copy non-ELF: $$@"
|
||||||
$$(copy-file-to-target)
|
$$(copy-file-to-target)
|
||||||
|
|
||||||
|
check-elf-prebuilt-product-copy-files: $(check_non_elf_file_timestamp)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# The -t option to acp and the -p option to cp is
|
# The -t option to acp and the -p option to cp is
|
||||||
|
|
Loading…
Reference in a new issue