Skip to content

build: clean previous compiled files after menuconfig updates#18821

Open
HyphenAlpha456 wants to merge 1 commit intoapache:masterfrom
HyphenAlpha456:fix/16151-menuconfig-clean
Open

build: clean previous compiled files after menuconfig updates#18821
HyphenAlpha456 wants to merge 1 commit intoapache:masterfrom
HyphenAlpha456:fix/16151-menuconfig-clean

Conversation

@HyphenAlpha456
Copy link
Copy Markdown

This PR addresses the build system bug where orphaned object files are left behind after configuration changes.

Changes:

  • Captures the state of the .config file before entering the menuconfig interface.
  • Compares the .config state upon exit.
  • If the configuration was modified, it automatically triggers make clean to ensure a fresh environment for the next build.

Fixes #16151

Fixes apache#16151. Compares .config state before and after kconfig-mconf and triggers 'make clean' if the configuration was modified to prevent orphaned object files.

Signed-off-by: Agnimitra sasaru <158492301+HyphenAlpha456@users.noreply.github.com>
@github-actions github-actions Bot added Area: Build system Size: XS The size of the change in this PR is very small labels Apr 29, 2026
@lupyuen lupyuen requested review from acassis and simbit18 April 30, 2026 01:27
Comment thread tools/Unix.mk
$(Q) cmp -s .config .config.tmp || $(MAKE) clean
$(Q) rm -f .config.tmp

nconfig: apps_preconfig
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all xconfig has the similar issue

Copy link
Copy Markdown
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the PR template :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Build system Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Building System is not clearing previous compiled files after running "make menuconfig"

3 participants