1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #14659 from leandrolanzieri/pr/kconfig/allow_clean_all

makefiles/kconfig.mk: include KCONFIG_OUT_CONFIG unconditionally
This commit is contained in:
Cenk Gündoğan 2020-07-31 18:06:26 +02:00 committed by GitHub
commit 9f4f27a8cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -678,9 +678,11 @@ pkg-build-%: $(BUILDDEPS)
$(QQ)"$(MAKE)" -C $(RIOTPKG)/$*
clean:
ifndef MAKE_RESTARTS
-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i clean ; done
-@rm -rf $(BINDIR)
-@rm -rf $(SCANBUILD_OUTPUTDIR)
endif
# Remove intermediates, but keep the .elf, .hex and .map etc.
clean-intermediates:

View File

@ -38,17 +38,10 @@ KCONFIG_MERGED_CONFIG = $(GENERATED_DIR)/merged.config
# configuration symbols to the build system.
KCONFIG_OUT_CONFIG = $(GENERATED_DIR)/out.config
# Include configuration symbols if available, only when not cleaning. This
# allows to check for Kconfig symbols in makefiles.
# Make tries to 'remake' all included files
# (see https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html).
# So if this file was included even when 'clean' is called, make would enter a
# loop, as it always is out-of-date.
# This has the side effect of requiring a Kconfig user to run 'clean' on a
# separate call (e.g. 'make clean && make all'), to get the symbols correctly.
ifneq ($(CLEAN),clean)
-include $(KCONFIG_OUT_CONFIG)
endif
# Include configuration symbols if available. This allows to check for Kconfig
# symbols in makefiles. Make tries to 'remake' all included files (see
# https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html).
-include $(KCONFIG_OUT_CONFIG)
# Flag that indicates that the configuration has been edited
KCONFIG_EDITED_CONFIG = $(GENERATED_DIR)/.editedconfig
@ -128,6 +121,9 @@ $(KCONFIG_MERGED_CONFIG): $(MERGECONFIG) $(KCONFIG_GENERATED_DEPENDENCIES) FORCE
# Build a header file with all the Kconfig configurations. genconfig will avoid
# any unnecessary rewrites of the header file if no configurations changed.
# The rule is not included when only `make clean` is called in order to keep the
# $(BINDIR) folder clean
ifneq (clean,$(MAKECMDGOALS))
$(KCONFIG_OUT_CONFIG) $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) &: $(KCONFIG_GENERATED_DEPENDENCIES) $(GENCONFIG) $(KCONFIG_MERGED_CONFIG) FORCE
$(Q) \
KCONFIG_CONFIG=$(KCONFIG_MERGED_CONFIG) $(GENCONFIG) \
@ -136,3 +132,5 @@ $(KCONFIG_OUT_CONFIG) $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) &: $(KCONFIG_GENERA
$(if $(KCONFIG_SYNC_DEPS),--sync-deps $(KCONFIG_SYNC_DIR)) \
$(KCONFIG)
endif
endif