From e8ad257d6609c0fcc532313da0e320082283b774 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Wed, 13 Oct 2021 14:22:51 +0200 Subject: [PATCH] Makefile.base: do not clean objects of bindist modules --- Makefile.base | 6 +++++- makefiles/vars.inc.mk | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.base b/Makefile.base index 4c285157ab..b4b1a495cc 100644 --- a/Makefile.base +++ b/Makefile.base @@ -114,7 +114,11 @@ $(BINDIR)/$(MODULE)/: $(Q)mkdir -p $@ OLD_OBJECTS = $(wildcard $(BINDIR)/$(MODULE)/*.o) -OBJECTS_TO_REMOVE = $(filter-out $(OBJ),$(OLD_OBJECTS)) + +# do not clean objects from bindist modules +ifeq (,$(filter $(MODULE),$(BIN_USEMODULE))) + OBJECTS_TO_REMOVE = $(filter-out $(OBJ),$(OLD_OBJECTS)) +endif $(MODULE).module compile-commands $(OBJ): | $(BINDIR)/$(MODULE)/ diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index e3c9f4a7bf..a77a351f53 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -21,6 +21,7 @@ export CXXINCLUDES # The extra include paths for c++, set by the vario export NATIVEINCLUDES # The native include paths, set by the various native Makefile.include files. export USEMODULE # Sys Module dependencies of the application. Set in the application's Makefile. +export BIN_USEMODULE # Modules specific to bindist (see bindist.ink.mk). Set in the application's Makefile. export USEPKG # Pkg dependencies (third party modules) of the application. Set in the application's Makefile. export DISABLE_MODULE # Used in the application's Makefile to suppress DEFAULT_MODULEs. # APPDEPS # Files / Makefile targets that need to be created before the application can be build. Set in the application's Makefile.