summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorJeff Epler <jepler@unpythonic.net>2021-03-07 11:48:16 -0600
committerJeff Epler <jepler@unpythonic.net>2021-03-07 11:48:39 -0600
commitf1ada8e8800a6ac64ebf611ba292b0eb93345c8e (patch)
tree8b102b2c7a6bbcacae181ef69a12f7afa2f6d9ae /supervisor
parent103632f444636b03aee67541887544f0e717aab3 (diff)
Automatically count EXTERNAL_FLASH_DEVICES
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/supervisor.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index 374b7a72b..f94bccd9a 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -33,6 +33,8 @@ endif
# (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive.
# But that might not be true in the future.)
ifdef EXTERNAL_FLASH_DEVICES
+ COMMA := ,
+ EXTERNAL_FLASH_DEVICE_COUNT := $(words $(subst $(COMMA), ,$(EXTERNAL_FLASH_DEVICES)))
CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \
-DEXTERNAL_FLASH_DEVICE_COUNT=$(EXTERNAL_FLASH_DEVICE_COUNT)