From b4a72b0585145cc9cb51bb82edaa909ec3962b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 9 Dec 2024 14:05:28 +0100 Subject: [PATCH] Makefile.in: Export $MAKE to be used by other scripts [Why] GNU make is sometimes installed as `gmake` and `make` points to another implementation that does not support GNU make extensions. The name of the make command is stored in `$(MAKE)` and sub-make processes automatically inherit and use this variable. However other executed commands and scripts do not get this variable by default. Therefore of a script tries to call make(1) again, it will either not find this value or, more likely, will hard-code `make`. [How] The top-level Makefile now exports the value of `$(MAKE)` into the environment of all executed sub-shells. This way, scripts can use the correct make command name if they need to run make(1) again. --- Makefile.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.in b/Makefile.in index ec5988348c54..aaad4ba93ea9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,6 +39,10 @@ ERTS = erts-@ERTS_VSN@ # Include verbose output variables include $(ERL_TOP)/make/output.mk +# Export the name of the actual make(1) command for executed scripts that +# execute make again. +export MAKE + # ---------------------------------------------------------------------- #