From efddd4aef983e7e7e85daa5032f41bb2e7c63191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Fri, 26 Oct 2018 15:04:32 +0200 Subject: [PATCH] Makefile.include: allow specifying makefiles to be parsed This allows specifying a list of files that should be parsed by make at the beginning and at the end of Makefile.include. It is a generic mechanism to allow specifying system wide configuration: * Globally overwrite the 'TERMPROG' * Specify a hard written port / debug_adapter_id for some BOARD values * Define you own specific targets * Override default targets It can include file before and after Makefile.include to allow handling different configurations. --- Makefile.include | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.include b/Makefile.include index 50cb94a6cf..a284f2dc95 100644 --- a/Makefile.include +++ b/Makefile.include @@ -1,6 +1,11 @@ # 'Makefile.include' directory, must be evaluated before other 'include' _riotbase := $(dir $(lastword $(MAKEFILE_LIST))) +# include RIOT_MAKEFILES_GLOBAL_PRE configuration files +# allows setting user specific system wide configuration parsed before the body +# of $(RIOTBASE)/Makefile.include +include $(RIOT_MAKEFILES_GLOBAL_PRE) + # Globally set default goal to `all` .DEFAULT_GOAL := all @@ -730,3 +735,8 @@ ifneq ($(_BASELIBS_VALUE_BEFORE_USAGE),$(BASELIBS)) endif endif # BOARD=none + +# include RIOT_MAKEFILES_GLOBAL_POST configuration files +# allows setting user specific system wide configuration parsed after the body +# of $(RIOTBASE)/Makefile.include +include $(RIOT_MAKEFILES_GLOBAL_POST)