Skip to content
Snippets Groups Projects
Unverified Commit d8a26431 authored by Gaëtan Harter's avatar Gaëtan Harter
Browse files

Makefile.include: process 'modules.inc.mk' before using BASELIBS

Build targets were using the immediate value of '$(BASELIBS)' before it was
actually set. bindist.inc.mk should also be processed before as it is adding
`BIN_USEMODULE` to `USEMODULE`.

This fixes use before define problems for:

 * `make -C examples/hello-world`
 * `make -C examples/bindist`
parent ce917269
No related branches found
No related tags found
No related merge requests found
...@@ -310,6 +310,14 @@ APPLICATION_MODULE ?= application_$(APPLICATION) ...@@ -310,6 +310,14 @@ APPLICATION_MODULE ?= application_$(APPLICATION)
BASELIBS += $(BINDIR)/$(APPLICATION_MODULE).a BASELIBS += $(BINDIR)/$(APPLICATION_MODULE).a
BASELIBS += $(APPDEPS) BASELIBS += $(APPDEPS)
# include bindist target
include $(RIOTMAKE)/bindist.inc.mk
# Add all USEMODULE modules to CFLAGS and populate BASELIBS
include $(RIOTMAKE)/modules.inc.mk
.PHONY: all link clean flash flash-only term doc debug debug-server reset objdump help info-modules .PHONY: all link clean flash flash-only term doc debug debug-server reset objdump help info-modules
.PHONY: print-size elffile binfile hexfile .PHONY: print-size elffile binfile hexfile
.PHONY: ..in-docker-container .PHONY: ..in-docker-container
...@@ -603,12 +611,6 @@ endif ...@@ -603,12 +611,6 @@ endif
# Include desvirt Makefile # Include desvirt Makefile
include $(RIOTTOOLS)/desvirt/Makefile.desvirt include $(RIOTTOOLS)/desvirt/Makefile.desvirt
# include bindist target
include $(RIOTMAKE)/bindist.inc.mk
# Add all USEMODULE modules to CFLAGS
include $(RIOTMAKE)/modules.inc.mk
# Build a header file with all common macro definitions and undefinitions # Build a header file with all common macro definitions and undefinitions
# make it phony to force re-run of the script every time even if the file exists # make it phony to force re-run of the script every time even if the file exists
# The script will only touch the file if anything has changed since last time. # The script will only touch the file if anything has changed since last time.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment