From patchwork Fri Jul 20 11:13:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 28524 Received: (qmail 70220 invoked by alias); 20 Jul 2018 11:13:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 70183 invoked by uid 89); 20 Jul 2018 11:13:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=sk:i386-pc, sk:i386pc, Hx-languages-length:1705, j, $ X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jul 2018 11:13:20 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id B9AFEE70 for ; Fri, 20 Jul 2018 13:13:18 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zfqQEGrvhde8 for ; Fri, 20 Jul 2018 13:13:17 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 01D16E6F for ; Fri, 20 Jul 2018 13:13:17 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id w6KBDGHA005644; Fri, 20 Jul 2018 13:13:16 +0200 (MEST) From: Rainer Orth To: gdb-patches@sourceware.org Subject: Support parallel make check with GNU make 4.2+ Date: Fri, 20 Jul 2018 13:13:16 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 I noticed that make -jN check would run make check-single when using GNU make 4.2.1. In the end, it turned out that this is due to this change from the make 4.2 NEWS file: * The amount of parallelism can be determined by querying MAKEFLAGS, even when the job server is enabled (previously MAKEFLAGS would always contain only "-j", with no number, when job server was enabled). The fix is trivial: just accept an optional arg to -j in Makefile.in (saw_dash_j). Tested on i386-pc-solaris2.11 with just make and make -j/-jN with both make 3.82 and 4.2.1. Ok for master? Rainer # HG changeset patch # Parent c46bee26ae481e40fea09b4bbdb35731ff6b354c 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 @@ -140,7 +140,7 @@ 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))) +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