Skip to content

Commit 9352b88

Browse files
authored
Merge pull request #12417 from cladmi/pr/make/boards/cpu_cpu_model_to_features
Makefile.features: assert CPU is defined by BOARD/Makefile.features
2 parents 4a02bdf + a37ce12 commit 9352b88

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed

Makefile.dep

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ OLD_USEPKG := $(sort $(USEPKG))
55
# include board dependencies
66
-include $(RIOTBOARD)/$(BOARD)/Makefile.dep
77

8-
# Transitional conditional include until all boards define 'CPU' in
9-
# Makefile.features
10-
ifneq (,$(CPU))
11-
# include cpu dependencies
12-
-include $(RIOTCPU)/$(CPU)/Makefile.dep
13-
endif
8+
# include cpu dependencies
9+
-include $(RIOTCPU)/$(CPU)/Makefile.dep
1410

1511
# include external modules dependencies
1612
# processed before RIOT ones to be evaluated before the 'default' rules.

Makefile.features

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@
55
# This makes them available when setting features based on CPU_MODEL in the cpu
66
# Makefile.features and also during dependency resolution.
77

8-
# Transition:
9-
# Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not
10-
# reflect the state of all boards for the moment.
11-
128
include $(RIOTBOARD)/$(BOARD)/Makefile.features
139

14-
# Transitional conditional include until all boards define 'CPU'
15-
ifneq (,$(CPU))
16-
include $(RIOTCPU)/$(CPU)/Makefile.features
17-
else
18-
$(warning CPU must be defined by board / board_common Makefile.features)
10+
# Sanity check
11+
ifeq (,$(CPU))
12+
$(error CPU must be defined by board / board_common Makefile.features)
1913
endif
2014

15+
include $(RIOTCPU)/$(CPU)/Makefile.features
16+
2117

2218
# Resolve FEATURES_ variables
2319
# Their value will only be complete after resolving dependencies

Makefile.include

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,6 @@ include $(RIOTBOARD)/$(BOARD)/Makefile.include
311311
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
312312
include $(RIOTCPU)/$(CPU)/Makefile.include
313313

314-
# Sanity check
315-
# The check is only done after 'include $(RIOTBOARD)/$(BOARD)/Makefile.include'
316-
# because we need to have the 'CPU' variable defined
317-
ifeq (,$(filter $(RIOTCPU)/$(CPU)/Makefile.features,$(MAKEFILE_LIST)))
318-
$(error $$(RIOTCPU)/$$(CPU)/Makefile.features must have been included by the board / board common Makefile.features or Makefile.features)
319-
endif
320-
321314
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
322315
# provide this macro
323316
TOOLCHAINS_SUPPORTED ?= gnu

0 commit comments

Comments
 (0)