Skip to content

Conversation

@ThePassionate
Copy link
Contributor

Summary

This PR adds a default preconfig target to Application.mk. This ensures that the make preconfig command (used to generate/update apps/Kconfig and sub-Kconfigs) can execute successfully across all subdirectories, even those that do not manage their own Kconfig files (e.g., modbus, nshlib).

Impact

This fix improves the robustness of the NuttX build system, specifically for environment reconfiguration scenarios. Without this fix, users cannot easily regenerate stale Kconfig files if their directory structure changes, as the recursive make process is blocked by subdirectories missing the preconfig target.

Testing

  • Scenario: Moved the apps and nuttx directories to a new parent location, invalidating existing Kconfig absolute/relative paths.
  • Before Fix: Running make preconfig TOPDIR=... in apps/ failed with:

make[1]: Entering directory '/path/to/apps/modbus' make[1]: *** No rule to make target 'preconfig'. Stop.

  • After Fix: make preconfig completes successfully. The apps/Kconfig is correctly regenerated with valid absolute paths, restoring build functionality.

When running 'make preconfig' from the apps directory (e.g. to regenerate
Kconfig files with absolute paths), the build fails in subdirectories
that include Application.mk but do not define a preconfig target
(e.g., apps/modbus, apps/nshlib).

This commit adds a dummy preconfig target to Application.mk to ensure
the recursive make successfully traverses these directories.

Signed-off-by: makejian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant