From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Oakley Subject: [PATCH v2 10b/16] engine.pl: delete the captured stderr file if empty Date: Mon, 20 Jul 2015 23:54:06 +0100 Message-ID: <1437432846-5796-3-git-send-email-philipoakley@iee.org> References: <1437432846-5796-1-git-send-email-philipoakley@iee.org> Cc: Junio C Hamano , Eric Sunshine To: Git List X-From: git-owner@vger.kernel.org Tue Jul 21 00:53:34 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZHJwC-00086Q-R9 for gcvg-git-2@plane.gmane.org; Tue, 21 Jul 2015 00:53:33 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757330AbbGTWxX (ORCPT ); Mon, 20 Jul 2015 18:53:23 -0400 Received: from out1.ip02ir2.opaltelecom.net ([62.24.128.238]:62450 "EHLO out1.ip02ir2.opaltelecom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757319AbbGTWxS (ORCPT ); Mon, 20 Jul 2015 18:53:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DJCAA7e61VPHMBFlxcgkFSVGmIKbVChXsEAgKBLz0QAQEBAQEBAQYBAQEBQAE/hCQBAQRWIxAISTkKBgENBhOIMgnJMAErkFIHhCsFlFKEb4k7ln6BCYMaPTEBgkoBAQE X-IPAS-Result: A2DJCAA7e61VPHMBFlxcgkFSVGmIKbVChXsEAgKBLz0QAQEBAQEBAQYBAQEBQAE/hCQBAQRWIxAISTkKBgENBhOIMgnJMAErkFIHhCsFlFKEb4k7ln6BCYMaPTEBgkoBAQE X-IronPort-AV: E=Sophos;i="5.15,510,1432594800"; d="scan'208";a="39174027" Received: from host-92-22-1-115.as13285.net (HELO localhost) ([92.22.1.115]) by out1.ip02ir2.opaltelecom.net with ESMTP; 20 Jul 2015 23:53:18 +0100 X-Mailer: git-send-email 2.3.1 In-Reply-To: <1437432846-5796-1-git-send-email-philipoakley@iee.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Keep the build clean of extraneous files if it is indeed clean. Otherwise leave the msvc-build-makedryerrors.txt file both as a flag for any CI system or for manual debugging. Alternatively, with improved syntactic sugar[1]: unlink $ErrsFile if -f -z $ErrsFile; could be used but requires Perl 5.10 or later, which is not available on Msysgit, but is available on the newer Git-for-Windows SDK on Msys2 [2]. 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 identically defined in their respective GIT_VERSION_GEN file DEF_VER variables. [1]: http://perldoc.perl.org/functions/-X.html [2]: http://git-for-windows.github.io/ Helped-by: Eric Sunshine Signed-off-by: Philip Oakley --- Eric's help gmane.comp.version-control.msysgit/21745 --- contrib/buildsystems/engine.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl index a6999b6..154575d 100755 --- a/contrib/buildsystems/engine.pl +++ b/contrib/buildsystems/engine.pl @@ -77,6 +77,8 @@ EOM my $ErrsFile = "msvc-build-makedryerrors.txt"; @makedry = `cd $git_dir && make -n MSVC=1 V=1 2>$ErrsFile` if !@makedry; +# test for an empty Errors file and remove it +unlink $ErrsFile if -f $ErrsFile && -z _; # Parse the make output into usable info parseMakeOutput(); -- 2.3.1