Skip to content

Commit

Permalink
Makefile.features: include CPU/Makefile.features when CPU is defined
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cladmi committed May 2, 2019
1 parent dfa18c9 commit 1620272
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
# reflect the state of all boards for the moment.

include $(RIOTBOARD)/$(BOARD)/Makefile.features

# Transitional conditional include until all boards define 'CPU'
ifneq (,$(CPU))
include $(RIOTCPU)/$(CPU)/Makefile.features
endif
2 changes: 1 addition & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,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
Expand Down

0 comments on commit 1620272

Please sign in to comment.