Conversation
|
Makes sense. Two changes in one commit though. |
Makefile.include
Outdated
| # | ||
| # all: | $(CLEAN) | ||
| # | ||
| CLEAN=$(filter clean, $(MAKECMDGOALS)) |
There was a problem hiding this comment.
This is not bash, we use spaces around equals.
94985c8 to
a0d653b
Compare
split in two. |
fjmolinas
left a comment
There was a problem hiding this comment.
LGTM, in #11818 you said:
Found an issue with the key generation targets not being properly serialized before "clean".
Split out a new "CLEAN" variable into #11821
Can you specify that scenario to reproduce and see this fixes it?
Otherwise I tested that make all -j and make clean all -j work as expected.
Makefile.include
Outdated
| BUILDRELPATH ?= $(patsubst $(RIOTPROJECT)/%,%,$(CURDIR)/) | ||
|
|
||
| # Set CLEAN to "clean" if that target was requested. | ||
| # Allowis recipes to be run after cleaning, without triggering it implicitly: |
Without this fix, |
|
@kaspar030 Thanks, verified this fixes the use case in #11818. Please squash directly once typo is fixed. |
Currently, some targets are serialized before "clean" by conditionally adding a dependency. Make does allow ordering using "|" syntax in prerequisites, but for "clean" that would always trigger the clean target. By only conditionally setting $(CLEAN) to clean, that can be circumvented. The new CLEAN allows any recipe to be run after "clean" by specifying "| $(CLEAN)" as prerequisite.
a0d653b to
4e051f8
Compare
done! |
|
Note for more advanced This correctly works because the target after |
Contribution description
Currently, some targets are serialized before "clean" by conditionally
adding a dependency.
Make does allow ordering using "|" syntax in prerequisites, but for
"clean" that would always trigger the clean target.
By only conditionally setting $(CLEAN) to clean, that can be
circumvented.
The new CLEAN allows any recipe to be run after "clean" by specifying "|
$(CLEAN)" as prerequisite.
Testing procedure
Try
make clean all -jandmake all -j, ensuring both still work as expected (both with existing and non-existingbin/.Issues/PRs references