Makefile.include: flash: do not peek into MAKECMDGOALS.#10548
Makefile.include: flash: do not peek into MAKECMDGOALS.#10548cladmi merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
I globally agree with the change. When introduced there were not many usages of My only remark, is that I would prefer to use an active verb. The |
|
What about "do-flash"? |
|
Sent too early… So maybe The build will also need to be re-triggered before merging as it was not done with |
|
Also, some infos I found about the https://stackoverflow.com/questions/5032935/why-gnu-make-canned-recipe-doesnt-work Here there should not be any issue for the moment as it is not using the name but maybe it is better to not put the |
|
Which also means, we need an |
|
That sucks! It means we cannot For reference, OSX's version of make is 12 years old. |
|
It was also in debian |
|
Shown irl, I found this line by checking something else: There might be others and they must be updated to |
|
For upcoming steps, as you are also working on cleaning it. |
|
I tested that the For me you can squash. Please put the I would like a test on mac before merging this too @smlng |
f61d89d to
051c45b
Compare
With the canned recipe for flashing, flash dependencies should be added to FLASHDEPS, instead of writing `flash: dependencies`. This ensures that both flash and flash-only depend on the same prerequisites.
|
@smlng can you take look at this? or someone else with a fruit computer? |
|
tested on macOS with |
|
@smlng Thanks! |
|
Just a last nitpick, can you please put in the commit description canned recipe definition that we do no use Note for future PRs, this can also be propagated later to |
|
BTW github still shows the kinetis commit after the other one, but the order is correct when looked locally. |
051c45b to
ae524e9
Compare
|
I updated the commit message and added a comment too. |
When flash-only was introduced (in RIOT-OS#8373), the `flash` rule was made conditionally dependent on `all` by looking for `flash-only` in MAKECMDGOALS. This was done to avoid code duplication. There's a cleaner way, by using canned recipes. When we upgrade the requirements to gnu make 4, the flash recipe can be defined as ?=.
cladmi
left a comment
There was a problem hiding this comment.
ACK. Changes reviewed and also work with mac.
Commit messages and order has been reviewed.
I locally re-tested this branch merged with riot/master.
I used flash and flash-only for iotlab-m3.
And also checked the wdog-disable.bin file was created when doing flash and flash-only for mulle, pba-d-01-kw2x and with USE_OLD_OPENOCD=1 BOARD=frdm-k22f. I cleaned the file between each command to verify it was created for both flash and flash-only.
Contribution description
When flash-only was introduced (in #8373), the
flashrule was made conditionally dependent onallby looking forflash-onlyin MAKECMDGOALS. This was done to avoid code duplication.There's a cleaner way, by using canned recipes.
Testing procedure
Go to any example and type
make flash-onlyandmake flash. You don't even need to have the board connected.In the first case it should not attempt to make all and in the second it should.
Issues/PRs references
Refactor of #8373.