diff --git a/Makefile.include b/Makefile.include index 42a412a4c9..0c34e3e471 100644 --- a/Makefile.include +++ b/Makefile.include @@ -10,15 +10,15 @@ endif # Will evaluate to the absolute path of the Makefile it's evaluated in.ยน # -# This variable MUST be immediately evaluated (tmp_var := $(MAKEFILEDIR)) +# This variable MUST be immediately evaluated (tmp_var := $(LAST_MAKEFILEDIR)) # unless it is used directly. # # [1] Note that this will in fact return the path of the last Makefile that # was included, so it must be evaluated before any subsequent includes. -MAKEFILEDIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) +LAST_MAKEFILEDIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) # 'Makefile.include' directory, must be evaluated before other 'include' -_riotbase := $(MAKEFILEDIR) +_riotbase := $(LAST_MAKEFILEDIR) # include RIOT_MAKEFILES_GLOBAL_PRE configuration files # allows setting user specific system wide configuration parsed before the body diff --git a/cpu/kinetis/Makefile.include b/cpu/kinetis/Makefile.include index 9a54d21cf9..cfbb0c6341 100644 --- a/cpu/kinetis/Makefile.include +++ b/cpu/kinetis/Makefile.include @@ -1,7 +1,7 @@ ifeq (,$(KINETIS_SERIES)) # Parse parameters from CPU_MODEL using the kinetis-info.mk script in the same # directory as this Makefile. - include $(MAKEFILEDIR)/kinetis-info.mk + include $(LAST_MAKEFILEDIR)/kinetis-info.mk endif # "The Vector table must be naturally aligned to a power of two whose alignment diff --git a/tests/cpp_exclude/module_exclude/Makefile.include b/tests/cpp_exclude/module_exclude/Makefile.include index 92c3a25a67..9655774048 100644 --- a/tests/cpp_exclude/module_exclude/Makefile.include +++ b/tests/cpp_exclude/module_exclude/Makefile.include @@ -1,3 +1,3 @@ -# Use an immediate variable to evaluate `MAKEFILEDIR` now -USEMODULE_INCLUDES_module_exclude := $(MAKEFILEDIR) +# Use an immediate variable to evaluate `LAST_MAKEFILEDIR` now +USEMODULE_INCLUDES_module_exclude := $(LAST_MAKEFILEDIR) USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_module_exclude) diff --git a/tests/cpp_ext/module/Makefile.include b/tests/cpp_ext/module/Makefile.include index c3cc48bdef..6c83a69e1e 100644 --- a/tests/cpp_ext/module/Makefile.include +++ b/tests/cpp_ext/module/Makefile.include @@ -1,3 +1,3 @@ # Use an immediate variable to evaluate `MAKEFILE_LIST` now -USEMODULE_INCLUDES_module := $(MAKEFILEDIR) +USEMODULE_INCLUDES_module := $(LAST_MAKEFILEDIR) USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_module) diff --git a/tests/external_module_dirs/external_module/Makefile.include b/tests/external_module_dirs/external_module/Makefile.include index 14d9974e66..b6d95d22b5 100644 --- a/tests/external_module_dirs/external_module/Makefile.include +++ b/tests/external_module_dirs/external_module/Makefile.include @@ -1,3 +1,3 @@ # Use an immediate variable to evaluate `MAKEFILE_LIST` now -USEMODULE_INCLUDES_external_module := $(MAKEFILEDIR)/include +USEMODULE_INCLUDES_external_module := $(LAST_MAKEFILEDIR)/include USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_external_module) diff --git a/tests/pkg_utensor/models/Makefile.include b/tests/pkg_utensor/models/Makefile.include index 563cf809c1..a8b3b1dcf9 100644 --- a/tests/pkg_utensor/models/Makefile.include +++ b/tests/pkg_utensor/models/Makefile.include @@ -1,5 +1,5 @@ # Use an immediate variable to evaluate `MAKEFILE_LIST` now -USEMODULE_INCLUDES_models := $(MAKEFILEDIR) +USEMODULE_INCLUDES_models := $(LAST_MAKEFILEDIR) USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_models) CXXEXFLAGS += -Wno-unused-parameter