With recent versions of the standard bash completion scripts for make, tab expansion targets are extracted using make -pq, while the code only checks for -qp. This fix makes the test more robust to handle both cases.

Bug: https://bugs.openjdk.java.net/browse/JDK-8174064
Patch inline:
diff --git a/make/Init.gmk b/make/Init.gmk
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -66,7 +66,7 @@
   ifeq ($(CALLED_SPEC_TARGETS), )
     ONLY_GLOBAL_TARGETS := true
   endif
-  ifneq ($(findstring qp, $(MAKEFLAGS)),)
+  ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
     ONLY_GLOBAL_TARGETS := true
   endif

/Magnus

Reply via email to