1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles: add code generator targets

These targets will bootstrap code for an example application, a test application or a new board support. The 'riotgen' tool is used behind
This commit is contained in:
Alexandre Abadie 2018-02-15 22:07:46 +01:00
parent aa2e84218f
commit a534caebb4
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 18 additions and 0 deletions

View File

@ -43,4 +43,5 @@ print-versions:
include makefiles/boards.inc.mk
include makefiles/app_dirs.inc.mk
include makefiles/tools/riotgen.inc.mk
-include makefiles/tests.inc.mk

View File

@ -0,0 +1,17 @@
.PHONY: riotgen-installed generate-%
-include makefiles/color.inc.mk
riotgen-installed:
@command -v riotgen 2>&1 > /dev/null || \
{ $(COLOR_ECHO) \
"$(COLOR_RED)'riotgen' command is not available \
please consider installing it from \
https://pypi.python.org/pypi/riotgen$(COLOR_RESET)"; \
exit 1; }
GENERATORS = board driver example module pkg test
$(addprefix generate-,$(GENERATORS)): generate-%
generate-%: riotgen-installed
@RIOTBASE=$(CURDIR) riotgen $* -i