From 19ae0d746acdf8dc5ff568295a188598bd4e89db Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 16 Mar 2021 11:21:07 +0100 Subject: [PATCH] Makefile: enable SECONDEXPANSION globally for modules and applications --- Makefile.base | 2 +- Makefile.include | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.base b/Makefile.base index 53f858e99a..50648e8669 100644 --- a/Makefile.base +++ b/Makefile.base @@ -5,7 +5,7 @@ endif # # enable second expansion of prerequisites. # -# Doing that here enables it globally for all modules and the application. +# Doing that here enables it globally for all modules # # See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html # for what it can be used for. diff --git a/Makefile.include b/Makefile.include index 9bb29c5ad7..b438a063c6 100644 --- a/Makefile.include +++ b/Makefile.include @@ -8,6 +8,15 @@ ifeq (,$(filter $(MATCH_MAKE_VERSION),$(MAKE_VERSION))) $(MATCH_MAKE_VERSION) or later.) endif +# +# enable second expansion of prerequisites. +# +# Doing that here enables it globally for all applications. +# +# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html +# for what it can be used for. +.SECONDEXPANSION: + # Will evaluate to the absolute path of the Makefile it's evaluated in.ยน # # This variable MUST be immediately evaluated (tmp_var := $(LAST_MAKEFILEDIR))