diff options
author | Elliot Berman <eberman@codeaurora.org> | 2021-07-15 13:07:02 -0700 |
---|---|---|
committer | Elliot Berman <eberman@codeaurora.org> | 2021-07-16 09:37:21 -0700 |
commit | 88cd9af345c90c7f97bd24d3dbd7a329f4c6b6c2 (patch) | |
tree | d1f2be7be7ea850be2d2dfd1a58d3d45c7c5951d | |
parent | 71636a456188146f2c71fa0faa3dc1a61ec6968e (diff) |
edk2: Fix tools dependency in AndroidBoot.mk
Previous "shell find" command only found files. Makefile's $(wildcard)
function will find symlinks and directories as well.
EmulatorPkg/Unix/Host/X11IncludeHack is a symlink to /opt/X11/include,
which may not be present on host and is not needed for compilation.
AOSP provides "find-subdir-files" which behaves like "find" under the
hood. Use this instead to get close to original behavior.
Change-Id: I28ca7678e9ab33cca0c05cad9ad0cf05de2651e5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
-rw-r--r-- | AndroidBoot.mk | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/AndroidBoot.mk b/AndroidBoot.mk index 46432d0746..fb1b103f01 100644 --- a/AndroidBoot.mk +++ b/AndroidBoot.mk @@ -144,24 +144,31 @@ $(ABL_OUT): # Top level target LOCAL_ABL_PATH := bootable/bootloader/edk2 -LOCAL_ABL_SRC_FILE := \ - $(wildcard $(LOCAL_ABL_PATH)/*) \ - $(wildcard $(LOCAL_ABL_PATH)/*/*) \ - $(wildcard $(LOCAL_ABL_PATH)/*/*/*) \ - $(wildcard $(LOCAL_ABL_PATH)/*/*/*/*) \ +_LOCAL_PATH := $(LOCAL_PATH) +LOCAL_PATH := $(LOCAL_ABL_PATH) +LOCAL_ABL_SRC_FILE := $(addprefix $(LOCAL_PATH)/,$(call find-subdir-files,-type f)) + +LOCAL_PATH := $(CLANG_BIN) +CLANG_FILES := $(addprefix $(LOCAL_PATH)/,$(call find-subdir-files,-type f)) + +LOCAL_PATH := $(CLANG35_GCC_TOOLCHAIN) +GCC_FILES := $(addprefix $(LOCAL_PATH)/,$(call find-subdir-files,-type f)) + +# Reset LOCAL_PATH to not confuse android build system later +LOCAL_PATH := $(_LOCAL_PATH) + +LOCAL_ABL_TOOLS := \ $(PREBUILT_PYTHON_PATH) \ $(MAKEPATH)make \ $(ANDROID_TOP)/$(CLANG) \ $(ANDROID_TOP)/$(CLANG_CXX) \ $(ANDROID_TOP)/$(HOST_AR) \ $(ANDROID_TOP)/$(SOONG_LLVM_PREBUILTS_PATH)/ld.lld \ - $(wildcard $(CLANG_BIN)/*) \ - $(wildcard $(CLANG35_GCC_TOOLCHAIN)/*) \ - $(wildcard $(CLANG35_GCC_TOOLCHAIN)/*/*) \ - $(wildcard $(CLANG35_GCC_TOOLCHAIN)/*/*/*) \ - $(wildcard $(CLANG35_GCC_TOOLCHAIN)/*/*/*/*) \ + $(CLANG_FILES) \ + $(GCC_FILES) \ $(SECTOOLSV2_BIN) -$(TARGET_ABL): $(LOCAL_ABL_SRC_FILE) | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET) + +$(TARGET_ABL): $(LOCAL_ABL_SRC_FILE) $(LOCAL_ABL_TOOLS) | $(ABL_OUT) $(INSTALLED_KEYSTOREIMAGE_TARGET) $(MAKEPATH)make -C bootable/bootloader/edk2 \ BOOTLOADER_OUT=../../../$(ABL_OUT) \ all \ |