GNU Make 4.4.1 changed the behavior of the variable MAKEFLAGS. This is causing 
our makefiles to behave weirdly in certain situations. We need to check for 
certain options in MAKEFLAGS to adjust behavior, and the way we do it is not 
compatible with GNU Make 4.4.1. In the GNU Make manual, it's [documented how 
you should query MAKEFLAGS for 
options](https://www.gnu.org/software/make/manual/make.html#Testing-Flags) and 
this patch is applying this recommendation. With this patch, I can successfully 
run the failing examples given in the bug using 4.4.1. I have also verified 
that tab completion still works and that the output of `make -p -q` looks the 
same before and after.

Big thanks to Jaikiran who found the solution to this!

-------------

Commit messages:
 - JDK-8331994

Changes: https://git.openjdk.org/jdk/pull/29942/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29942&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8331994
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/29942.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29942/head:pull/29942

PR: https://git.openjdk.org/jdk/pull/29942

Reply via email to