-
Notifications
You must be signed in to change notification settings - Fork 2.1k
makefiles/kconfig: include out.config only when running Kconfig #16064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makefiles/kconfig: include out.config only when running Kconfig #16064
Conversation
Is there any way we can have the clean happen before menuconfig? I find myself doing a lot of:
It would be nicer if I could just go
Just a thought though. |
or have a different target |
@MrKevinWeiss does this solve your issue; diff --git a/makefiles/kconfig.mk b/makefiles/kconfig.mk
index 96f9b57459..d9f523f827 100644
--- a/makefiles/kconfig.mk
+++ b/makefiles/kconfig.mk
@@ -115,7 +115,7 @@ USEPKG_W_PREFIX = $(addprefix USEPKG_,$(USEPKG))
# Opens the menuconfig interface for configuration of modules using the Kconfig
# system. It will try to update the autoconf.h, which will update if needed
# (i.e. out.config changed).
-menuconfig: $(MENUCONFIG) $(KCONFIG_OUT_CONFIG)
+menuconfig: $(MENUCONFIG) $(KCONFIG_OUT_CONFIG) | $(CLEAN)
$(Q)KCONFIG_CONFIG=$(KCONFIG_OUT_CONFIG) $(MENUCONFIG) $(KCONFIG)
$(MAKE) $(KCONFIG_GENERATED_AUTOCONF_HEADER_C)
|
From local tests this seems to work correctly for me, @leandrolanzieri should some of this be tested in docker as well? ( |
I think the clean needs to happen before the menuconfig, with this I need to run |
Maybe this isn't part of this PR though. |
I think there might be a problem with this, regarding the generation of |
Not sure if that would change something, but it would be good just to be sure |
Works as expected for me. |
@MrKevinWeiss other then the |
Yup! A very clean solution 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK!
Thanks for reviewing ! |
Contribution description
This modifies the Kconfig makefile to only source the
out.config
file into the build system when Kconfig has to run. There is no need to include it otherwise.Testing procedure
We need to make sure this change keeps Kconfig working across different workflows. I tested the following:
make menuconfig
>make all
should loadout.config
env TEST_KCONFIG=1 make
should loadout.config
, using dependency modellingmake
(on an application without Kconfig files) should not loadout.config
make menuconfig
>make clean all
should not loadout.config
(because of the clean).config
files or menuconfig should always loadout.config
until clean is executedTo check if there are Kconfig symbols loaded to the build system, one can add something like the following to an application makefile, and run the workflows described above (and more!) on native:
Issues/PRs references
Addresses the problem described in #16009 (comment)