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

Makefile.include: Fix default RIOTBASE when there is Makefile.local

When an application only includes Makefile.include without specifying
RIOTBASE and uses a `Makefile.local` file, RIOTBASE would use a wrong
default value and get the value of the directory where `Makefile.local` is.
This commit is contained in:
Gaëtan Harter 2018-10-29 11:47:16 +01:00
parent 289e635e5a
commit f82ace910f
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -1,3 +1,6 @@
# 'Makefile.include' directory, must be evaluated before other 'include'
_riotbase := $(dir $(lastword $(MAKEFILE_LIST)))
# Globally set default goal to `all`
.DEFAULT_GOAL := all
@ -5,7 +8,7 @@
-include Makefile.local
# set undefined variables
RIOTBASE ?= $(dir $(lastword $(MAKEFILE_LIST)))
RIOTBASE ?= $(_riotbase)
CCACHE_BASEDIR ?= $(RIOTBASE)
RIOTCPU ?= $(RIOTBASE)/cpu
RIOTBOARD ?= $(RIOTBASE)/boards