mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-23 23:40:47 +08:00
Upgrading the NuttX apps submodule (kernel bump or switching branches then `git submodule update`) updates tracked files only. When the new revision removes an application directory, the autogenerated Kconfig a previous build left inside it is untracked, so it survives `git clean -dX`. mkkconfig.sh keeps globbing that orphaned `*/Kconfig`, whose stale `source` points at a file that no longer exists, breaking `make olddefconfig`: olddefconfig: apps/gpsutils/Kconfig:9: 'apps/gpsutils/minmea/Kconfig' not found Add a `cmake -P` helper, invoked at the end of the `clean` target, that walks the apps Kconfig graph and removes only untracked Kconfig files that source a missing path. Tracked files and the nuttx tree (whose stale artifacts are all gitignored and already dropped by `git clean -dX`) are never touched, so a `make clean` before rebuilding now migrates cleanly across the upgrade. Assisted-by: Claude:claude-opus-4.8 Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>