mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Makefile.include: allow directories that cannot be overridden
Allow defining new directory variables that will not be overridden when set from command line. Command line is supposed to override from the value in make. Promoting another behavior is against `make`.
This commit is contained in:
parent
50c2a2ca06
commit
fc84c90f66
@ -59,6 +59,12 @@ __DIRECTORY_VARIABLES := \
|
||||
DLCACHE_DIR \
|
||||
#
|
||||
|
||||
# In GNU make command line is supposed to override the value set in makefile
|
||||
# These variables can be overridden even when set from command line
|
||||
__OVERRIDE_DIRECTORY_VARIABLES := $(__DIRECTORY_VARIABLES)
|
||||
# Use absolute paths in recursive "make" even if overridden on command line.
|
||||
MAKEOVERRIDES += $(foreach v,$(__OVERRIDE_DIRECTORY_VARIABLES),$(v)=$($(v)))
|
||||
|
||||
# Make all paths absolute.
|
||||
override RIOTBASE := $(abspath $(RIOTBASE))
|
||||
override RIOTCPU := $(abspath $(RIOTCPU))
|
||||
@ -82,9 +88,6 @@ ifneq (, $(filter-out 1, $(foreach v,$(__DIRECTORY_VARIABLES),$(words $($(v)))))
|
||||
$(error Make sure no path override is empty or contains spaces!)
|
||||
endif
|
||||
|
||||
# Use absolute paths in recusive "make" even if overriden on command line.
|
||||
MAKEOVERRIDES += $(foreach v,$(__DIRECTORY_VARIABLES),$(v)=$($(v)))
|
||||
|
||||
# Path to the current directory relative to RIOTPROJECT
|
||||
# trailing '/' is important when RIOTPROJECT == CURDIR
|
||||
BUILDRELPATH ?= $(patsubst $(RIOTPROJECT)/%,%,$(CURDIR)/)
|
||||
|
Loading…
Reference in New Issue
Block a user