aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2019-01-05 15:49:50 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2019-01-05 15:49:50 +0000
commitb470e1ae0feb1d173465f8083248ad4324755592 (patch)
tree89eeb538bf0871730aa890c37b042988f7929654 /os/hal
parent90ddeb9ef88675bfd5cc84be3c2ee215f9404720 (diff)
downloadChibiOS-b470e1ae0feb1d173465f8083248ad4324755592.tar.gz
ChibiOS-b470e1ae0feb1d173465f8083248ad4324755592.tar.bz2
ChibiOS-b470e1ae0feb1d173465f8083248ad4324755592.zip
Improved search of configuration files.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12529 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/hal.mk10
-rw-r--r--os/hal/ports/STM32/STM32F0xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32F1xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk10
-rw-r--r--os/hal/ports/STM32/STM32F37x/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32F3xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32F4xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32F7xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32H7xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32L0xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32L1xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32L4xx+/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32L4xx/platform.mk10
-rw-r--r--os/hal/ports/STM32/STM32L4xx/platform_l432.mk10
14 files changed, 98 insertions, 42 deletions
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