apps: use CONFIGURED_APPS to iterate clean targets #397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Before this change CLEANDIRS was used, which is built from
detecting dummy .depend/.kconfig files, which is problematic
since when there's an intermediate subdirectory which does not
have it, subdirectories below this level will not be found
(even if they do have these files).
Since we already know exactly which subdirectories we need
to clean based on configured apps, we directly clean over these.
I started looking into this since I found that the
btsak
applicationwas not being cleaned due to this reason, which sits at
apps/wireless/bluetooth/btsak
and
bluetooth
was not being cleaned since there were none of this dummy files there.I would like to hear your thoughts on why this might be wrong
or not. I feel there's quite a bit of "magic files" placed around and
these are used to drive many targets and this is becoming very confusing
to maintain. My reasoning is that we should go into the subdirectories
we know need cleaning from the top-level Makefile directly and then let
each application Makefile drive the cleaning using its
clean
target.I have not changed yet the similar logic in
Directory.mk
forCLEANSUBDIRS
which is still driven by
.depend
and.kconfig
files as it is not clear to mehow works. I'm guessing that after this change, it is not necessary, but I'm unsure.
Impact
Application build system
Testing
Building and cleaning and looking for leftover
.o
s