On 2021-09-13 07:16, Kaz Kylheku (gmake) wrote:
It looks like -e is some sort of experimental hack with mysterious effects that is under-documented on purpose, with a warning not to use it.
Except, oops, POSIX specifies this option. POSIX does not say that using -e is "not recommended" (or otherwise deprecated or anything of the sort), and does not specify any weird interaction with command line definitions or passage to sub-makes. The only effect of -e should be that when a variable definition occurring inside a makefile is being processed, then if the variable exists in the environment, it overrides. That's it. When we are testing a Makefile that contains no assignments to FOO, then -e should make no difference to its behavior with regard to FOO, because the only construct affected by -e is completely absent. OTOH, POSIX also doesn't describe $(origin ...). So that is to say, it's not clear whether a purely POSIX Makefile can reproduce any -e nonconformance under GNU Make. Since the GNU Manual does not recommend -e be used, it was likely given low priority.