make: remove exports for flash debug reset#11554
Conversation
|
The branch will need to be rebased, but I will do it after a review as I used commits hashs for simplifying the testing. |
|
All the tests succeeded on murdock, so I disable running tests for the moment. |
Handle differently variables that are exported in `vars.inc.mk` from the ones that should not. This is needed for the upcoming variables change that should also be removed from `vars.inc.mk` right now. Keeping the old behavior will help migrating other variables more easily by keeping them only exported in vars.inc.mk in the first time.
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. This will also prevent evaluating 'PORT' for FFLAGS when not needed. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `84 insertions(+), 84 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `24 insertions(+), 24 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `55 insertions(+), 55 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
MSPDEBUGFLAGS is evaluated only in the same file. Its value does not need to be exported. This will also prevent evaluating 'PORT' for MSPDEBUGFLAGS when not needed.
PREFLASHER/PREFFLAGS/FLASHDEPS are evaluated by the main Makefile.include. Their value does not need to be exported. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `16 insertions(+), 16 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE` plus the newline that is said to have changed.
Add sanity check for removed exports.
acb839f to
d486598
Compare
I found the time to rebase and update the PR description accordingly. |
|
First basic tests, without taking a deeper look into the commits: can still run |
|
I got 29 files changes instead of 28, maybe after the rebase? |
fjmolinas
left a comment
There was a problem hiding this comment.
Reviewed the commit history, every commit individually makes sense and the tests run individually at the different stages make sense as well.
Flashed/Debugged/Rested: frdm-kw64f, samr21-xpro, nucleo-l152re, nucleol476rg.
Everything looks good to me so ACK.
I was missing the |
|
Note for the future. This may break if new boards that gets merged without re-running tests on master. Only change required is to remove the export on the |
|
Thank you for the review. |
|
Now its time to rebase the |
Contribution description
This removes
exportfor all variables related toflash/reset/debug.They do not need to be exported as they are all evaluated in
Makefile.includeor a file included by it.This does not remove export
PORTfor the moment as it is easier to review it on its own as it will have a different review schemeTesting procedure
There is not real testing procedure except, it would all still be working, but not really realistic for testing.
Better do an in depth review to find issues.
If any issue happened because of this, it could be easier to fix the missing case.
Running
make flash/make reset/make debugstill works on one of your boards.At least it should not break
CI.Review prodecure
The only usages of the variables are in
Makefile.includeor.inc.mkfiles:No match when using
${}Only required changes are changed
The only changes are
[-export-]and comments{+#+}git diff --color=auto --word-diff 1dc479de0 '**' ':!dist/tools/buildsystem_sanity_check/check.sh'Only the right amount of lines have been changed
Edited to 29 files changed.
This includes:
exportchanged.makefiles/vars.inc.mkMSPDEBUGFLAGS(that I did not added to build_system_check as really specific)cpu/esp32/Makefile.includeforPREFFFLAGSAnd from the
buildsystem_sanity_checkoutput, on the original commit 1dc479dMatches the number of
exportchangedIssues/PRs references
Part of #10850
In depth cleanup required for #10440