meson: reconfigure on incremental builds
authorAndre Heider <a.heider@gmail.com>
Tue, 9 Mar 2021 09:12:38 +0000 (10:12 +0100)
committerAndre Heider <a.heider@gmail.com>
Wed, 17 Mar 2021 09:16:28 +0000 (10:16 +0100)
When toggling a package specific config knob, we need to pass --reconfigure
to the meson setup command if an earlier build already exists.

Fixes #15032.

Signed-off-by: Andre Heider <a.heider@gmail.com>
devel/meson/meson.mk

index ac74bd5bf50263a33b36794c27d192886b70001f..6ae9c8da230464553b801a8c39cb7bca54587628 100644 (file)
@@ -97,6 +97,7 @@ endef
 define Host/Configure/Meson
        $(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt)
        $(call Meson, \
+               setup $(if $(wildcard $(MESON_HOST_BUILD_DIR)/meson-*),--reconfigure,) \
                --native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
                $(MESON_HOST_ARGS) \
                $(MESON_HOST_BUILD_DIR) \
@@ -120,6 +121,7 @@ define Build/Configure/Meson
        $(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt)
        $(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt)
        $(call Meson, \
+               setup $(if $(wildcard $(MESON_BUILD_DIR)/meson-*),--reconfigure,) \
                --buildtype plain \
                --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
                --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \