This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support parallel make check with GNU make 4.2+


Hi Tom,

>>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
> Rainer> The fix is trivial: just accept an optional arg to -j in Makefile.in
> Rainer> (saw_dash_j).  Tested on i386-pc-solaris2.11 with just make and make
> Rainer> -j/-jN with both make 3.82 and 4.2.1.
>
> Rainer> Ok for master?
>
> Thanks for doing this, and nice work noticing it.
> This is OK if you first fix the nit that Andreas pointed out.

here's what I've checked in.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* Makefile.in (saw_dash_j): Allow for GNU make 4.2+ passing -jN in
	MAKEFLAGS.

# HG changeset patch
# Parent  4aa118a772bdc3c80b028bbb31ccbe3866b6199e
Support parallel make check with GNU make 4.2+

diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -137,10 +137,11 @@ uninstall: force
 
 installcheck:
 
-# See whether -j was given to make.  Either it was given with no
-# arguments, and appears as "j" in the first word, or it was given an
-# argument and appears as "-j" in a separate word.
-saw_dash_j = $(or $(findstring j,$(firstword $(MAKEFLAGS))),$(filter -j,$(MAKEFLAGS)))
+# See whether -j was given to make.  Before GNU make 4.2, either it was
+# given with no arguments, and appears as "j" in the first word, or it was
+# given an argument and appears as "-j" in a separate word.  Starting with
+# GNU make 4.2, it always appears as "-j"/"-jN" in a separate word.
+saw_dash_j = $(or $(findstring j,$(firstword $(MAKEFLAGS))),$(filter -j%,$(MAKEFLAGS)))
 
 # Try to run the tests in parallel if any -j option is given.  If RUNTESTFLAGS
 # is not empty, then by default the tests will be serialized.  This can be

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]