Skip to content

Commit ec9cd25

Browse files
committed
Makefile: add .DEFAULT target to further guide new users
1 parent 0e20bfd commit ec9cd25

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ include makefiles/tools/riotgen.inc.mk
4949

5050
include makefiles/color.inc.mk
5151

52-
welcome:
52+
# Prints a welcome message
53+
define welcome_message
5354
@echo "Welcome to RIOT - The friendly OS for IoT!"
5455
@echo ""
5556
@echo "You executed 'make' from the base directory."
@@ -70,3 +71,13 @@ welcome:
7071
@echo "==> tl;dr Try running:"
7172
@echo " cd examples/default"
7273
@echo " make BOARD=<INSERT_BOARD_NAME>"
74+
endef
75+
76+
welcome:
77+
$(call welcome_message)
78+
79+
.DEFAULT:
80+
@echo '*** ERROR: unrecognized target "$@"'
81+
@echo ""
82+
$(call welcome_message)
83+
@exit 1

0 commit comments

Comments
 (0)