dropbear: simplify rebuild on config changes
authorKonstantin Demin <rockdrilla@gmail.com>
Tue, 8 Jul 2025 16:12:26 +0000 (19:12 +0300)
committerPaul Spooren <mail@aparcar.org>
Fri, 11 Jul 2025 09:23:50 +0000 (11:23 +0200)
It's hard or even impossible to track affected sources
so it's safe to remove all built objects (if any).

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
package/network/services/dropbear/Makefile

index 5bedcc171d5ee4f30a9215d671e2658216a3b3d6..c99779886001e7b9d55762a995c07f37df057c5f 100644 (file)
@@ -233,11 +233,6 @@ define Build/Configure/dropbear_headers
        ))
 endef
 
-define Build/Configure/dropbear_objects
-       grep -ERZl -e '($(subst $(space),|,$(strip $(sort $(patsubst !!%,%,$(foreach s,$(DB_OPT_COMMON) $(DB_OPT_CONFIG),$(word 1,$(subst $(comma),$(space),$(s)))))))))' \
-       $(PKG_BUILD_DIR)/ | sed -zE 's/^(.+)\.[^.]+$$$$/\1.o/' | sort -uV | xargs -0 -r rm -fv || :
-endef
-
 define Build/Configure
        rm -f $(PKG_BUILD_DIR)/localoptions.h
        $(Build/Configure/Default)
@@ -245,10 +240,8 @@ define Build/Configure
        : > $(PKG_BUILD_DIR)/localoptions.h
        $(Build/Configure/dropbear_headers)
 
-       # Enforce rebuild of files depending on configured options
-       $(Build/Configure/dropbear_objects)
-
-       # Rebuild them on config change
+       # Enforce rebuild
+       rm -rf $(PKG_BUILD_DIR)/obj
        +$(MAKE) -C $(PKG_BUILD_DIR)/libtomcrypt clean
        +$(MAKE) -C $(PKG_BUILD_DIR)/libtommath clean
 endef