diff --git a/Makefile.include b/Makefile.include index 058b3466cc..1e92115e95 100644 --- a/Makefile.include +++ b/Makefile.include @@ -340,9 +340,9 @@ ifeq ($(RIOT_CI_BUILD),1) endif # if you want to publish the board into the sources as an uppercase #define -BOARDDEF := $(shell echo $(BOARD) | tr 'a-z' 'A-Z' | tr '-' '_') -CPUDEF := $(shell echo $(CPU) | tr 'a-z' 'A-Z' | tr '-' '_') -MCUDEF := $(shell echo $(MCU) | tr 'a-z' 'A-Z' | tr '-' '_') +BOARDDEF = $(call uppercase_and_underscore,$(BOARD)) +CPUDEF = $(call uppercase_and_underscore,$(CPU)) +MCUDEF = $(call uppercase_and_underscore,$(MCU)) CFLAGS += -DRIOT_APPLICATION=\"$(APPLICATION)\" CFLAGS += -DBOARD_$(BOARDDEF)=\"$(BOARD)\" -DRIOT_BOARD=BOARD_$(BOARDDEF) CFLAGS += -DCPU_$(CPUDEF)=\"$(CPU)\" -DRIOT_CPU=CPU_$(CPUDEF)