From 7d326e663b5b3cc795f4206581408bd86d3b070f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Thu, 2 May 2019 16:47:08 +0200 Subject: [PATCH] Makefile.features: add a common file for the features parsing This will allow sharing it between Makefile.include and makefiles/info-global.inc.mk. Also some common variables definition can also be moved to here. Part of moving CPU/CPU_MODEL definition to Makefile.features to have it available before Makefile.include. --- Makefile.features | 3 +++ Makefile.include | 2 +- makefiles/info-global.inc.mk | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 Makefile.features diff --git a/Makefile.features b/Makefile.features new file mode 100644 index 000000000000..4008a32b7ca2 --- /dev/null +++ b/Makefile.features @@ -0,0 +1,3 @@ +# Process FEATURES variables + +include $(RIOTBOARD)/$(BOARD)/Makefile.features diff --git a/Makefile.include b/Makefile.include index f8b09dbd0dd3..d0468a86124b 100644 --- a/Makefile.include +++ b/Makefile.include @@ -245,7 +245,7 @@ export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-) INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include # process provided features -include $(RIOTBOARD)/$(BOARD)/Makefile.features +include $(RIOTBASE)/Makefile.features # mandatory includes! include $(RIOTMAKE)/pseudomodules.inc.mk diff --git a/makefiles/info-global.inc.mk b/makefiles/info-global.inc.mk index cd5c836ee85f..f6996eddad42 100644 --- a/makefiles/info-global.inc.mk +++ b/makefiles/info-global.inc.mk @@ -16,7 +16,9 @@ define board_missing_features FEATURES_OPTIONAL := $(FEATURES_OPTIONAL_GLOBAL) FEATURES_MISSING := FEATURES_PROVIDED := - include $$(RIOTBOARD)/$(1)/Makefile.features + + include $(RIOTBASE)/Makefile.features + ifdef BUILDTEST_MCU_GROUP ifneq ($(BUILDTEST_MCU_GROUP), $$(FEATURES_MCU_GROUP)) BOARDS_FEATURES_MISSING += "$(1) $(BUILDTEST_MCU_GROUP)"