bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undocumented variable MAKE_COMMAND


From: Frank Heckenbach
Subject: undocumented variable MAKE_COMMAND
Date: Sat, 10 Feb 2024 03:48:21 +0100

I got some strange make errors about resetting jobserver mode etc.

Long story short, after some debugging I found the reason:

I use an optional wrapper for make which I invoke via an environment
variable which I (plausbly) named MAKE_COMMAND. To my surprise, I
found that recursive makes using $(MAKE) called my wrapper instead
of make.

Apparently make reads this variable, but this is not documented.

Now that I grepped for it, I see that ChangeLog mentions it in the
context of VMS in 2014, and a NEWS entry from 1993 says:

  * The `MAKE' variable is always defined as `$(MAKE_COMMAND) $(MAKEOVERRIDES)'.
    The `MAKE_COMMAND' variable is now defined to the name with which make
    was invoked.

None of these can really count as current documentation anyway, but
even if I had seen it, I would have understood it to mean that make
sets (in my case, overrrides) the variable before it uses it.

Most importantly, the manual doesn't mention it at all. I think it
should prominently mention a variable that has such a profound
impact on make's operation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]