MAKEFLAGS is actually the solution. You can *add* to it and the flags take
effect.
Thanks for the trick.
Unfortunately, the filtering is still a big issue in practice. If you take a look at OpenWrt's makefile, you will see that it is a huge beast with
many contributors. The same is true for other projects.
But even if you have a smaller project, it is a pain having to remember every
time that you need to filter/restore your MAKEFLAGS for every sub-make.
It would be much better if GNU Make could do that automatically, like it does
for settings like .ONESHELL .
Regards,
rdiez