-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile.include: flash: do not peek into MAKECMDGOALS. #10548
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I give the ACK, but would prefer to have @cladmi have the final word and honour to hit the green button.
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 ?=.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
flash
rule was made conditionally dependent onall
by looking forflash-only
in 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-only
andmake 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.