build: fix CONFIG_AUTOREMOVE for packages with multiple variants
[openwrt/openwrt.git] / include / subdir.mk
index e76a01e18ab885466b45734831c3c737c4c823d0..6bbf23a492289876382a76679c47759c80bc8fe4 100644 (file)
@@ -52,7 +52,7 @@ rebuild_check = \
                $(if $(BUILD_LOG),mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \
                $$(NO_TRACE_MAKE) $(if $(BUILD_LOG),-d) -q $(subdir_make_opts) .$(if $(3),$(3)-)$(2) \
                        > $(if $(BUILD_LOG),$(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/check-$(if $(3),$(3)-)$(2).txt,/dev/null) 2>&1 || \
-                       $$(SUBMAKE) $(subdir_make_opts) clean >/dev/null 2>/dev/null
+                       $$(SUBMAKE) $(subdir_make_opts) clean-build >/dev/null 2>/dev/null
 
 endif