]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mbedtls: Apply configuration in Configure instead of Prepare 19358/head
authorKarsten Sperling <ksperling@apple.com>
Tue, 8 Jul 2025 01:25:39 +0000 (13:25 +1200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Jul 2025 15:41:35 +0000 (17:41 +0200)
This ensures mbedtls_config.h is correctly updated and the package rebuilt
accordingly when configuration options are changed after the source is first
prepared.

Signed-off-by: Karsten Sperling <ksperling@apple.com>
Link: https://github.com/openwrt/openwrt/pull/19358
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/libs/mbedtls/Makefile

index 017b4b442a9ad1b283516cac14795b9ab140beba..655526eecbee2cd34b0a03a586c55743986e2b28 100644 (file)
@@ -137,14 +137,12 @@ CMAKE_OPTIONS += \
        -DENABLE_TESTING:Bool=OFF \
        -DENABLE_PROGRAMS:Bool=ON
 
-define Build/Prepare
-       $(call Build/Prepare/Default)
-
-       $(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
-        $(foreach opt,$(MBEDTLS_BUILD_OPTS),
-        $(PKG_BUILD_DIR)/scripts/config.py \
-        -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
-        $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
+define Build/Configure
+       $(call Build/Configure/Default,)
+       $(foreach opt,$(MBEDTLS_BUILD_OPTS),
+       $(PKG_BUILD_DIR)/scripts/config.py \
+               -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
+               $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt)))
 endef
 
 define Build/InstallDev