From 08570cadce0cc61a9e4c4acf93fb78021a01e1ac Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 18 Aug 2023 09:02:00 +0100 Subject: [PATCH] Add support for 'make CONFIG_clean' as per 'make TARGET_clean' (#13038) --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 5b148ada6a..3b639c7255 100644 --- a/Makefile +++ b/Makefile @@ -474,6 +474,8 @@ $(BASE_TARGETS): TARGETS_CLEAN = $(addsuffix _clean,$(BASE_TARGETS)) +CONFIGS_CLEAN = $(addsuffix _clean,$(BASE_CONFIGS)) + ## clean : clean up temporary / machine-generated files clean: @echo "Cleaning $(TARGET_NAME)" @@ -492,6 +494,10 @@ test_clean: $(TARGETS_CLEAN): $(V0) $(MAKE) -j TARGET=$(subst _clean,,$@) clean +## _clean : clean up one specific target (alias for above) +$(CONFIGS_CLEAN): + $(V0) $(MAKE) -j CONFIG=$(subst _clean,,$@) clean + ## clean_all : clean all targets clean_all: $(TARGETS_CLEAN) test_clean