Skip to content

makefiles/riotgen: fix colors and behavior for undefined generate-* targets #21448

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

Open
wants to merge 1 commit into from

Conversation

crasbe
Copy link
Contributor

@crasbe crasbe commented Apr 28, 2025

Contribution description

Recently I noticed that when you call make generate-Makefile.ci from the base directory, it would try to call riotgen Makefile.ci, which obviously fails. Likewise with any other generate-* target. Also, the colors for the warnings did not work for the warning when riotgen is not installed:

image

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.

image

Testing procedure

Run make generate-bogus and make 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 that make generate-test will still call riotgen and ask you for the application name.

@crasbe crasbe added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 28, 2025
@github-actions github-actions bot added Area: build system Area: Build system Area: tools Area: Supplementary tools labels Apr 28, 2025
When executing `make generate-Makefile.ci` in the base directory,
the make system would try to call `riotgen` with `Makefile.ci`,
which does not work. Likewise with any other target like
`make generate-bogus`. The pattern rule for the prerequisites was
not evaluated by make, therefore the check did not work as
intended.
@riot-ci
Copy link

riot-ci commented Apr 28, 2025

Murdock results

✔️ PASSED

f163888 makefiles/riotgen: fix colors and behav. for undef. targets

Success Failures Total Runtime
10319 0 10320 12m:24s

Artifacts

@crasbe crasbe added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Apr 28, 2025
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed locally to work as described, thanks!

@mguetschow mguetschow enabled auto-merge April 29, 2025 07:55
@mguetschow mguetschow added this pull request to the merge queue Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants