Skip to content
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: add .DEFAULT target to further guide new users #20895

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

mguetschow
Copy link
Contributor

Contribution description

With #20187, running make or make all in the RIOT base directory prints the welcome message including a list of available targets to be called from there. However, when the user enters an unknown target such as make unknown, Make only outputs a generic error.

This PR fixes this and shows the welcome message instead.

Testing procedure

on master:

$ make unknown
make: *** No rule to make target 'unknown'.  Stop.

with this PR:

$ make unknown         
*** ERROR: unrecognized target "unknown"

Welcome to RIOT - The friendly OS for IoT!

You executed 'make' from the base directory.
Usually, you should run 'make' in your application's directory instead.

Please see our Quick Start Guide at:
    https://doc.riot-os.org/getting-started.html
You can ask questions or discuss with other users on our forum:
    https://forum.riot-os.org

Available targets for the RIOT base directory include:
 generate-{board,driver,example,module,pkg,test,features}
 info-{applications,boards,emulated-boards} info-applications-supported-boards
 print-versions
 clean distclean pkg-clean
 doc doc-{man,latex}

==> tl;dr Try running:
    cd examples/default
    make BOARD=<INSERT_BOARD_NAME>
make: *** [Makefile:83: unknown] Error 1

Issues/PRs references

#20187

@mguetschow mguetschow requested a review from maribu October 8, 2024 09:15
@mguetschow mguetschow added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 8, 2024
@riot-ci
Copy link

riot-ci commented Oct 8, 2024

Murdock results

✔️ PASSED

ec9cd25 Makefile: add .DEFAULT target to further guide new users

Success Failures Total Runtime
10196 0 10197 17m:40s

Artifacts

@maribu maribu enabled auto-merge October 8, 2024 10:40
@maribu maribu added this pull request to the merge queue Oct 8, 2024
Merged via the queue into RIOT-OS:master with commit 4e797a1 Oct 8, 2024
28 checks passed
@mguetschow mguetschow deleted the make-unrecognized branch October 9, 2024 07:58
@benpicco benpicco added this to the Release 2024.10 milestone Nov 27, 2024
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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants