From nobody Thu May 2 18:04:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529634115075629.5024827202643; Thu, 21 Jun 2018 19:21:55 -0700 (PDT) Received: from localhost ([::1]:58585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWBhr-0002KH-9P for importer@patchew.org; Thu, 21 Jun 2018 22:21:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWBgu-00020t-UC for qemu-devel@nongnu.org; Thu, 21 Jun 2018 22:20:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWBgr-00053Q-MK for qemu-devel@nongnu.org; Thu, 21 Jun 2018 22:20:48 -0400 Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:34439) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fWBgr-00053L-H2 for qemu-devel@nongnu.org; Thu, 21 Jun 2018 22:20:45 -0400 Received: by mail-qt0-x232.google.com with SMTP id d3-v6so4779648qto.1 for ; Thu, 21 Jun 2018 19:20:45 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id d6-v6sm5402162qta.61.2018.06.21.19.20.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 19:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c9l98kc/XotyFXcPDmLlNoSYUJUKdQJZJDB5AKNNcQ4=; b=efU4PgMRUBcJXovKSWOm1CrwrzSAoQ6nLiCAuYr6CrzfaglxjFpFuTZqbY73YWs+gt Z1leNxRVScN9YeQf7zQxyypEj2SClt1NrD9cvgegsBxnWfKy3mEXBwZmyUVK//2sZhaD Ljd6bY1XWQFyBloFvXzFqU6C+LrwGlWYWVpnzTXG5cn+Z+BgZy5uHPUPe2G77PZYtmmq k3kYro/qC774B/+Z57gZkrY/NQo5bjUsuTBTlq09nJSL0ATftorpGc+ilw8TDmqmTlRA tcFQVJcboH2hVaEwKRPXFN9z2u9uuIPjjPYkkJGRtttVmdDG4OpxiA2F5Ymp8J60o5oD a6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=c9l98kc/XotyFXcPDmLlNoSYUJUKdQJZJDB5AKNNcQ4=; b=OwbsG2188+IkIjgdeRUmtuFKll+GWF539Ksnh2WhW5i3CmJylefSN9WsOHgcaXeTqq bUAIYfHbnzWAAToZuJVRx/IME7Js53mDMf6t12QlX0ahvYofKZXAL0D2BLiyvNHQdQuU HfByc3YsZaFR2qLytLFK5VhLRyTaCEblZOexyfDSypvq04sjGA/UPANOrs7pkgeP+PVi wATaE6fE5dXO1bzlEDxtokDFCJWkcE8EOcrTMNFYnQ2u226Q2e7zo2cID8M/kTdzFZ3t p8rjaD8GuOOMH1RmSp9BO/wJQsJgazOBXe4XjyqcM92YKMaY4TYzOwu5FqDBM0mVly++ TiWg== X-Gm-Message-State: APt69E0XaShmu1AJDAcy28+vwP0qnPAEe6mfDRbd4P2tMauzieMW5g3h 1Y3h/cpK4bqIFm5fX24QFQM= X-Google-Smtp-Source: ADUXVKJXARRA2fcCYs0GwpwZp531loMZKMmlwkJlHyunsriXAcaH9NkTk95F+GWPzuLVszY52jV4xg== X-Received: by 2002:a0c:bb83:: with SMTP id i3-v6mr24993233qvg.84.1529634044992; Thu, 21 Jun 2018 19:20:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Peter Maydell , Fam Zheng , Eric Blake Date: Thu, 21 Jun 2018 23:20:35 -0300 Message-Id: <20180622022035.18490-1-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::232 Subject: [Qemu-devel] [RFC PATCH] Makefile: Enable synchronized parallel output when possible X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S . Tsirkin" , qemu-devel@nongnu.org, Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 The '--output-sync' option is available since GNU make 4.0. 5.4.1 Output During Parallel Execution When running several recipes in parallel the output from each recipe appears as soon as it is generated, with the result that messages from different recipes may be interspersed, sometimes even appearing on the same line. This can make reading the output very difficult. To avoid this you can use the =E2=80=98--output-sync=E2=80=99 (=E2=80=98-= O=E2=80=99) option. This option instructs make to save the output from the commands it invokes and print it all once the commands are completed. Additionally, if there are multiple recursive make invocations running in parallel, they will communicate so that only one of them is generating output at a time. There are four levels of granularity when synchronizing output, specified by giving an argument to the option (e.g., =E2=80=98-Oline=E2= =80=99 or =E2=80=98--output-sync=3Drecurse=E2=80=99). none This is the default: all output is sent directly as it is generated and no synchronization is performed. line Output from each individual line of the recipe is grouped and printed as soon as that line is complete. If a recipe consists of multiple lines, they may be interspersed with lines from other recipes. target Output from the entire recipe for each target is grouped and printed once the target is complete. This is the default if the --output-sync or -O option is given with no argument. recurse Output from each recursive invocation of make is grouped and printed once the recursive invocation is complete. Regardless of the mode chosen, the total build time will be the same. The only difference is in how the output appears. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Maybe 'line' is better for workstation and 'target/recurse' for unattended builds. doc: https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index e46f2b625a..e94c687afe 100644 --- a/Makefile +++ b/Makefile @@ -367,6 +367,10 @@ DOCS=3D endif =20 SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory --quiet) BUILD_DIR=3D$(= BUILD_DIR) +ifeq ($(shell test $(firstword $(subst ., ,$(MAKE_VERSION))) -ge 4; echo $= $?),0) +SUBDIR_MAKEFLAGS+=3D--output-sync=3Dtarget +endif + SUBDIR_DEVICES_MAK=3D$(patsubst %, %/config-devices.mak, $(TARGET_LIST)) SUBDIR_DEVICES_MAK_DEP=3D$(patsubst %, %-config-devices.mak.d, $(TARGET_LI= ST)) =20 --=20 2.18.0.rc2