From 18dca4851066fe984ae9bf73aa811896525c8fc8 Mon Sep 17 00:00:00 2001 From: NikLeberg Date: Fri, 28 Jan 2022 12:41:18 +0000 Subject: [PATCH] pkg/esp32_sdk: add requirements to PKG_PREPARE The shared `build-libs` directory needs to be available for modules/packages that depend on the SDK before that package is eventually compiled. This also includes header files such as `esp32_idf_version.h`. Packages are downloaded, patched, prepared before any module is compiled. By adding the directory creation and header as a dependency of `PKG_PREPARE` we make sure the rules are ran before compilation starts. --- pkg/esp32_sdk/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/esp32_sdk/Makefile b/pkg/esp32_sdk/Makefile index 0d0c813b5d..1538c7d02c 100644 --- a/pkg/esp32_sdk/Makefile +++ b/pkg/esp32_sdk/Makefile @@ -20,11 +20,13 @@ ESP32_SDK_LIBS = $(addprefix $(ESP32_SDK_BUILD_DIR)/, $(ESP32_SDK_COMPONENT_LIBS all: $(ESP32_SDK_LIBS) $(ESP32_SDK_VER_FILE) -$(ESP32_SDK_BUILD_DIR): +$(PKG_PREPARED): $(ESP32_SDK_BUILD_DIR) $(ESP32_SDK_VER_FILE) + +$(ESP32_SDK_BUILD_DIR): $(PKG_PATCHED) $(Q)mkdir -p $(ESP32_SDK_BUILD_DIR) # Set the SDK version from the SDK hash/tag. For example "v3.1-51-g913a06a9". -$(ESP32_SDK_VER_FILE): +$(ESP32_SDK_VER_FILE): $(PKG_PATCHED) | $(ESP32_SDK_BUILD_DIR) $(Q)echo "#define IDF_VER \"$(ESP32_SDK_VER_CMD)\"" > $@ $(ESP32_SDK_BUILD_DIR)/lib%.a: \