makefiles/riotgen: fix colors and behavior for undefined generate-*
targets
#21448
+11
−7
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.
Contribution description
Recently I noticed that when you call
make generate-Makefile.ci
from the base directory, it would try to callriotgen Makefile.ci
, which obviously fails. Likewise with any othergenerate-*
target. Also, the colors for the warnings did not work for the warning whenriotgen
is not installed:With this PR, the unrecognized target will be called out by the
Welcome Message
and the colors work for the warning. Also I made the warning a bit nicer.Testing procedure
Run
make generate-bogus
andmake generate-Makefile.ci
in the base directory and observe that the correct warning is displayed.Uninstall
riotgen
and see that the warning is colored.Install
riotgen
again and see thatmake generate-test
will still callriotgen
and ask you for the application name.