From b470e1ae0feb1d173465f8083248ad4324755592 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 5 Jan 2019 15:49:50 +0000 Subject: Improved search of configuration files. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12529 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/hal.mk | 10 +++++++--- os/hal/ports/STM32/STM32F0xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32F1xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk | 10 +++++++--- os/hal/ports/STM32/STM32F37x/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32F3xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32F4xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32F7xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32H7xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32L0xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32L1xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32L4xx+/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32L4xx/platform.mk | 10 +++++++--- os/hal/ports/STM32/STM32L4xx/platform_l432.mk | 10 +++++++--- 14 files changed, 98 insertions(+), 42 deletions(-) (limited to 'os/hal') diff --git a/os/hal/hal.mk b/os/hal/hal.mk index 991a0c2df..7d7db63aa 100644 --- a/os/hal/hal.mk +++ b/os/hal/hal.mk @@ -3,11 +3,15 @@ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) HALSRC := $(CHIBIOS)/os/hal/src/hal.c \ $(CHIBIOS)/os/hal/src/hal_st.c \ diff --git a/os/hal/ports/STM32/STM32F0xx/platform.mk b/os/hal/ports/STM32/STM32F0xx/platform.mk index a1177882a..b8975be7e 100644 --- a/os/hal/ports/STM32/STM32F0xx/platform.mk +++ b/os/hal/ports/STM32/STM32F0xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32F1xx/platform.mk b/os/hal/ports/STM32/STM32F1xx/platform.mk index 303211f57..4179fa910 100644 --- a/os/hal/ports/STM32/STM32F1xx/platform.mk +++ b/os/hal/ports/STM32/STM32F1xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),) PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/hal_adc_lld.c diff --git a/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk b/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk index 051916b0a..f44a0a319 100644 --- a/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk +++ b/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),) PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/hal_adc_lld.c diff --git a/os/hal/ports/STM32/STM32F37x/platform.mk b/os/hal/ports/STM32/STM32F37x/platform.mk index 4cf94b09d..6fa673330 100644 --- a/os/hal/ports/STM32/STM32F37x/platform.mk +++ b/os/hal/ports/STM32/STM32F37x/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),) PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F37x/hal_adc_lld.c diff --git a/os/hal/ports/STM32/STM32F3xx/platform.mk b/os/hal/ports/STM32/STM32F3xx/platform.mk index ae7b3ff19..67673bd59 100644 --- a/os/hal/ports/STM32/STM32F3xx/platform.mk +++ b/os/hal/ports/STM32/STM32F3xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32F4xx/platform.mk b/os/hal/ports/STM32/STM32F4xx/platform.mk index 2b039dd46..7b5cd41b4 100644 --- a/os/hal/ports/STM32/STM32F4xx/platform.mk +++ b/os/hal/ports/STM32/STM32F4xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32F7xx/platform.mk b/os/hal/ports/STM32/STM32F7xx/platform.mk index e1a1b3113..9a50343b5 100644 --- a/os/hal/ports/STM32/STM32F7xx/platform.mk +++ b/os/hal/ports/STM32/STM32F7xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32H7xx/platform.mk b/os/hal/ports/STM32/STM32H7xx/platform.mk index d5b700105..9853db181 100644 --- a/os/hal/ports/STM32/STM32H7xx/platform.mk +++ b/os/hal/ports/STM32/STM32H7xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32L0xx/platform.mk b/os/hal/ports/STM32/STM32L0xx/platform.mk index 204462468..41c606479 100644 --- a/os/hal/ports/STM32/STM32L0xx/platform.mk +++ b/os/hal/ports/STM32/STM32L0xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32L1xx/platform.mk b/os/hal/ports/STM32/STM32L1xx/platform.mk index 35927121f..813b1a200 100644 --- a/os/hal/ports/STM32/STM32L1xx/platform.mk +++ b/os/hal/ports/STM32/STM32L1xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),) PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/hal_adc_lld.c diff --git a/os/hal/ports/STM32/STM32L4xx+/platform.mk b/os/hal/ports/STM32/STM32L4xx+/platform.mk index 53288ba6e..0f03aff1e 100644 --- a/os/hal/ports/STM32/STM32L4xx+/platform.mk +++ b/os/hal/ports/STM32/STM32L4xx+/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32L4xx/platform.mk b/os/hal/ports/STM32/STM32L4xx/platform.mk index 74d951175..e2ced8fb4 100644 --- a/os/hal/ports/STM32/STM32L4xx/platform.mk +++ b/os/hal/ports/STM32/STM32L4xx/platform.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif diff --git a/os/hal/ports/STM32/STM32L4xx/platform_l432.mk b/os/hal/ports/STM32/STM32L4xx/platform_l432.mk index ee776e720..9f62e865a 100644 --- a/os/hal/ports/STM32/STM32L4xx/platform_l432.mk +++ b/os/hal/ports/STM32/STM32L4xx/platform_l432.mk @@ -11,11 +11,15 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ ifeq ($(USE_SMART_BUILD),yes) # Configuration files directory -ifeq ($(CONFDIR),) - CONFDIR = . +ifeq ($(HALCONFDIR),) + ifeq ($(CONFDIR),) + HALCONFDIR = . + else + HALCONFDIR := $(CONFDIR) + endif endif -HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define")) +HALCONF := $(strip $(shell cat $(HALCONFDIR)/halconf.h | egrep -e "\#define")) else endif -- cgit v1.2.3