1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Makefile.features: include CPU/Makefile.features 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.features`. 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 commit is contained in:
Gaëtan Harter 2019-05-02 11:49:20 +02:00
parent 5c0ba89e81
commit 376b09b875
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
2 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,11 @@
include $(RIOTBOARD)/$(BOARD)/Makefile.features
# Transitional conditional include until all boards define 'CPU'
ifneq (,$(CPU))
include $(RIOTCPU)/$(CPU)/Makefile.features
endif
# Resolve FEATURES_ variables
# Their value will only be complete after resolving dependencies

View File

@ -275,7 +275,7 @@ include $(RIOTCPU)/$(CPU)/Makefile.include
# The check is only done after 'include $(RIOTBOARD)/$(BOARD)/Makefile.include'
# because we need to have the 'CPU' variable defined
ifeq (,$(filter $(RIOTCPU)/$(CPU)/Makefile.features,$(MAKEFILE_LIST)))
$(error $$(RIOTCPU)/$$(CPU)/Makefile.features must have been included by the board / board common Makefile.features)
$(error $$(RIOTCPU)/$$(CPU)/Makefile.features must have been included by the board / board common Makefile.features or Makefile.features)
endif
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't