buildsystem: save/load build config, simplify clean and build --all #2518
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.
Following on from #2516, this is an attempt to save some "state" within each build directory so that it doesn't have to be parsed from the build directory name which isn't going to be reliable/easy in every case.
Have I missed anything (any variables, reasons why this won't work)?
It's not perfect, I realise it's possible to rebuild with different DEBUG values each time, so the presence of DEBUG is somewhat informational and probably shouldn't be relied upon, but would represent the last value used.
The config is only saved when executing
scripts/image
- not sure if this is going to be a problem with addons. I can't imagine anyone builds the main image exclusively usingscripts/build
.