On Sun, 2021-12-26 at 04:46 +0100, Reto wrote: > Is this a bug or am I missing something from the docs?
The -r and -R options don't take effect until the makefiles are all parsed. After that is complete, then if the -R option was given, then all variables which are still at their "default" value are changed to undefined. However, you raise an interesting question. Maybe ?= should behave differently in this situation. At the very least it seems like the value of RM should not be unset. It should either be marked as left at its "default" value (because it was "set" when ?= was run) or it should be changed to the new value. But having it be not defined seems to me to be incorrect.
