From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 381FE1F461 for ; Thu, 18 Jul 2019 13:19:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390491AbfGRNTM (ORCPT ); Thu, 18 Jul 2019 09:19:12 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40893 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390449AbfGRNTK (ORCPT ); Thu, 18 Jul 2019 09:19:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id r1so28655629wrl.7 for ; Thu, 18 Jul 2019 06:19:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=zuklBnmBkOH1DW/KuvkOJnWKJpRaISv/StUbkCyU4xc=; b=JQR0fsaCWXzYDios6pijrwH8AKldikj5F3bAe/waXoRmfBrZZoMvPkP+Q0+GCJt09L B7mQAI22SJ0DOwNPyAqZdTpQRxaMaCbFtErderW/nwGEM+LD4SEJc3TOzWWE5B/uq+yy x2pc2NUkdpbnVfTFD2PrwRA27fzorSDcOrlDbi6gfaCVEK0IuDkcR5yzpqo/fURHU1xz Z/9RIvLXEoS+NLoJusj9XsQ+J5h7bUyQxUtLoukBokMyiPzQtHuwrQgO65a57SDSp8YZ ujlYDwG73iVzdrKhY8OBXy6Ph+B/bW69GjaOLvnFDYaGphUhbZkXWVA+MYvbiQRzJfUD fVbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=zuklBnmBkOH1DW/KuvkOJnWKJpRaISv/StUbkCyU4xc=; b=Mf8iobDmzSZfDFjPDrINyrzSbrdRDFspjmYwskJLblSWGdTwRuWLj/TsHXjfgTrGgn +Gb9NNNa2W46XKWv2QckccEFGCPWSMHnqTwg10FcgIRcEUeju3ZFmrDRqniBsXqAxf91 tvwq5DwlvcXeE0uNqki89iyX9AZ430XtcGH/wTua+MODZnoyrjTbcx6F3AwOCrC8PNoq OwiJi5U07QcCrRU0puVF0tWg+saj+LLgJfG5q4ssiqJcKrjMeEdNUmDL2pTJaD+o6Dv8 Ac3nYvQxwLaigumwZo/FvND6T4SwSYIQH+Ne8NGTM4X13NmOZ64o+TYKtmyzpNfddF8s 91+A== X-Gm-Message-State: APjAAAVxeNMe3jH1cpuMfMBqjvNz3n718p5NcYlR4TPy6o+Dr82qrTVP 6toZCHY/DnZORXNmr7uerLM19su3 X-Google-Smtp-Source: APXvYqz+3XOA4bdyBzixV3cuBtPE8IL+b+wnEnv/z5wUdhJkkUUrnLJhUYQtPjGQuXbZo+R6yXQOTQ== X-Received: by 2002:adf:f544:: with SMTP id j4mr50365519wrp.150.1563455947930; Thu, 18 Jul 2019 06:19:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c9sm23564433wml.41.2019.07.18.06.19.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2019 06:19:07 -0700 (PDT) Date: Thu, 18 Jul 2019 06:19:07 -0700 (PDT) X-Google-Original-Date: Thu, 18 Jul 2019 13:18:45 GMT Message-Id: <3cfbb7843ac3a27c79da4554cc550608b19f2d55.1563455939.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Philip Oakley via GitGitGadget" Subject: [PATCH 10/24] contrib/buildsystems: redirect errors of the dry run into a log file Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: Junio C Hamano , Philip Oakley Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Philip Oakley Rather than swallowing the errors, it is better to have them in a file. To make it obvious what this is about, use the file name 'msvc-build-makedryerrors.txt'. Further, if the output is empty, simply delete that file. As we target Git for Windows' SDK (which, unlike its predecessor msysGit, offers Perl versions newer than 5.8), we can use the quite readable syntax `if -f -z $ErrsFile` (available in Perl >=5.10). Note that the file will contain the new values of the GIT_VERSION and GITGUI_VERSION if they were generated by the make file. They are omitted if the release is tagged and indentically defined in their respective GIT_VERSION_GEN file DEF_VER variables. Signed-off-by: Philip Oakley Signed-off-by: Johannes Schindelin --- contrib/buildsystems/engine.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl index 9db3d43a1e..de5c0b6b25 100755 --- a/contrib/buildsystems/engine.pl +++ b/contrib/buildsystems/engine.pl @@ -73,7 +73,12 @@ sub showUsage EOM # Pipe a make --dry-run into a variable, if not already loaded from file -@makedry = `cd $git_dir && make -n MSVC=1 V=1 2>/dev/null` if !@makedry; +# Capture the make dry stderr to file for review (will be empty for a release build). + +my $ErrsFile = "msvc-build-makedryerrors.txt"; +@makedry = `make -C $git_dir -n MSVC=1 V=1 2>$ErrsFile` if !@makedry; +# test for an empty Errors file and remove it +unlink $ErrsFile if -f -z $ErrsFile; # Parse the make output into usable info parseMakeOutput(); -- gitgitgadget