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 96B731F462 for ; Mon, 29 Jul 2019 20:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730270AbfG2UIN (ORCPT ); Mon, 29 Jul 2019 16:08:13 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43682 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730175AbfG2UIJ (ORCPT ); Mon, 29 Jul 2019 16:08:09 -0400 Received: by mail-wr1-f65.google.com with SMTP id p13so63172426wru.10 for ; Mon, 29 Jul 2019 13:08: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=uVo6Ei6FyHS1xxlwdzkAJqMZFCmhubA9L8T4IbZ1xEtc2qVcotc5P+A+1IGVKuwgZg yhElbRe1wpXGhe/yaUxxb+ljZFEaC3FMU23MAZLTTbz6VIGGRKr0VjEBpS2pq4I+ajpd YkzmPXs4px7DNoP+1r/wuPiqD3XzPRkevWH+tyDY/ZEGnzhJl3JYBXNu8OuF9PEepa3I F2iJyWcVr7evOvjevbyjM6yW36fSmyIOlnhUGx+/hanKgQr+Cm6wbc5C/ljyVVADHqpd 1xafksScuUMR1K5za8C4CZ03FzHESN/vnGAjXMaKBu2t8MP3KHOkzk5wtdfgBsYQ/wl8 OlpA== 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=eKB9SI9ws5dkM3r3BhhWmvb/kKX4/D4etvNpcWi3OdUEYY9i+b9RvolDHkmeMlrlVD ivbZ4cVLONx9ApMJf8RVrvuac+CWb2lgD6OCuZThg22M3g+RtlXfOw8S1P9F+A/6aRuh oYR+km8ZpLKBbDaSmGqOyAfGfukB9xwgomb6ruPTadGYrwVqyVBf927POsfFoRshEd/D KZHA7F6xSCrWK16i3KwFVWPNH4TxzM0whO5zgSBQxlcdlgVpDfDOT+ba9u9NFC1+KFhL ANdxbxhddoEGIS5Pg99sBtsbiOn9NDPcvnPlx+E1+KRAsnWwnzP+4MGSMnyiGrTvcOx5 o03A== X-Gm-Message-State: APjAAAU+NY60mbFK7SwtPRxS8em+eQHlXRVCZzaYh2ot+x0u6SFK5Lzn Pgopk7EXL1QK5ozvG1wfhj42EgX2 X-Google-Smtp-Source: APXvYqwo92nY7VBcaaWW3xfhl/TQA1aTDjqmDkAluOO48KMPg1Bm9tYNCb4w972+J3UBluigLsmbEg== X-Received: by 2002:adf:ab51:: with SMTP id r17mr95917503wrc.95.1564430887682; Mon, 29 Jul 2019 13:08:07 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id t3sm49576248wmi.6.2019.07.29.13.08.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jul 2019 13:08:07 -0700 (PDT) Date: Mon, 29 Jul 2019 13:08:07 -0700 (PDT) X-Google-Original-Date: Mon, 29 Jul 2019 20:07:46 GMT Message-Id: <3cfbb7843ac3a27c79da4554cc550608b19f2d55.1564430879.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Philip Oakley via GitGitGadget" Subject: [PATCH v2 10/23] 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