[build] add case modifier to modules' makefile

- this allow to use lower and upper version of a makefile variable.
- can also be use to provide default value to some variables.
This commit is contained in:
Gautier Hattenberger
2016-02-10 18:05:43 +01:00
parent 15eb4e7550
commit 904507a4e6
38 changed files with 97 additions and 231 deletions
+3 -13
View File
@@ -39,19 +39,9 @@ For more informations on how to use this module you can refer to the wiki : http
<periodic fun="high_speed_logger_direct_memory_periodic()" autorun="TRUE"/>
<makefile>
<raw>
HS_LOG_UART ?= uart3
HS_LOG_UART_LOWER=$(shell echo $(HS_LOG_UART) | tr A-Z a-z)
HS_LOG_UART_UPPER=$(shell echo $(HS_LOG_UART) | tr a-z A-Z)
HS_LOG_SPI ?= spi1
HS_LOG_SPI_LOWER=$(shell echo $(HS_LOG_SPI) | tr A-Z a-z)
HS_LOG_SPI_UPPER=$(shell echo $(HS_LOG_SPI) | tr a-z A-Z)
HS_LOG_SPI_SLAVE ?= spi_slave1
HS_LOG_SPI_SLAVE_LOWER=$(shell echo $(HS_LOG_SPI_SLAVE) | tr A-Z a-z)
HS_LOG_SPI_SLAVE_UPPER=$(shell echo $(HS_LOG_SPI_SLAVE) | tr a-z A-Z)
</raw>
<configure name="HS_LOG_UART" value="uart3" default="TRUE" case="upper|lower"/>
<configure name="HS_LOG_SPI" value="spi1" default="TRUE" case="upper|lower"/>
<configure name="HS_LOG_SPI_SLAVE" value="spi_slave1" default="TRUE" case="upper|lower"/>
<define name="SPI_MASTER" value="1" />
<define name="USE_$(HS_LOG_SPI_UPPER)" value="1" />