1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00
RIOT/makefiles/tools/riotgen.inc.mk
crasbe f1638882cc makefiles/riotgen: fix colors and behav. for undef. targets
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.
2025-04-28 22:24:57 +02:00

22 lines
617 B
Makefile

.PHONY: riotgen-installed _generate-%
RIOTMAKE=$(RIOTBASE)/makefiles
-include $(RIOTMAKE)/utils/ansi.mk
-include $(RIOTMAKE)/color.inc.mk
riotgen-installed:
@command -v riotgen > /dev/null 2>&1 || \
{ $(COLOR_ECHO) \
"$(COLOR_RED)'riotgen' command is not available.\n\
Please consider installing it with 'pip install riotgen' or download \
it from https://pypi.python.org/pypi/riotgen.$(COLOR_RESET)"; \
exit 1; }
GENERATORS = board driver example module pkg test
.SECONDEXPANSION:
$(addprefix generate-,$(GENERATORS)): $$(addprefix _,$$@)
_generate-%: riotgen-installed
@RIOTBASE=$(CURDIR) riotgen $* -i