From fecc9c178d2300cd4bdca445be79c6faa40b4460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Tue, 11 Jun 2019 14:16:10 +0200 Subject: [PATCH] Makefile.dep: include CPU/Makefile.dep when CPU is defined Prepare for when boards define `CPU` in `BOARD/Makefile.features`. Include '$(RIOTCPU)/$(CPU)/Makefile.features' directly when it is defined. This will allow removing the file inclusion from the `BOARD/Makefile.dep`. The board must then not include it directly. Transitional change to allow migrating part by parts. Part of moving CPU/CPU_MODEL definition to Makefile.features to have it available before Makefile.include. This can currently trigger including two times the cpu/CPU/Makefile.dep but allows a by board complete migration. --- Makefile.dep | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.dep b/Makefile.dep index 900e87685e..0de7d7ec19 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -5,6 +5,13 @@ OLD_USEPKG := $(sort $(USEPKG)) # include board dependencies -include $(RIOTBOARD)/$(BOARD)/Makefile.dep +# Transitional conditional include until all boards define 'CPU' in +# Makefile.features +ifneq (,$(CPU)) + # include cpu dependencies + -include $(RIOTCPU)/$(CPU)/Makefile.dep +endif + # include external modules dependencies # processed before RIOT ones to be evaluated before the 'default' rules. -include $(EXTERNAL_MODULE_DIRS:%=%/Makefile.dep)