Skip to content

Commit

Permalink
Makefile.in: Export $MAKE to be used by other scripts
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
dumbbell committed Dec 9, 2024
1 parent d6989c8 commit b4a72b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

# ----------------------------------------------------------------------

#
Expand Down

0 comments on commit b4a72b0

Please sign in to comment.