diff --git a/Makefile.base b/Makefile.base index 8f13e7d3b2..27eda61550 100644 --- a/Makefile.base +++ b/Makefile.base @@ -2,6 +2,15 @@ ifeq (, $(__RIOTBUILD_FLAG)) $(error You cannot build a module on its own. Use "make" in your application's directory instead.) endif +# +# enable second expansion of prerequisites. +# +# Doing that here enables it globally for all modules and the application. +# +# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html +# for what it can be used for. +.SECONDEXPANSION: + unexport DIRS DIRS := $(sort $(abspath $(DIRS)))