From: Philip Oakley <philipoakley@iee.org>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH v2 10b/16] engine.pl: delete the captured stderr file if empty
Date: Mon, 20 Jul 2015 23:54:06 +0100 [thread overview]
Message-ID: <1437432846-5796-3-git-send-email-philipoakley@iee.org> (raw)
In-Reply-To: <1437432846-5796-1-git-send-email-philipoakley@iee.org>
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 <sunshine@sunshineco.com>
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
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
next prev parent reply other threads:[~2015-07-20 22:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 22:54 [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again Philip Oakley
2015-07-20 22:54 ` [PATCH v2 8b/16] engine.pl: ignore invalidcontinue.obj which is known to MSVC Philip Oakley
2015-07-20 22:54 ` Philip Oakley [this message]
2015-07-20 23:07 ` [PATCH v2b 00/16, 2 updates] Make the msvc-build scripts work again Junio C Hamano
2015-07-21 16:46 ` Philip Oakley
2015-07-21 19:25 ` Junio C Hamano
2015-07-21 20:04 ` Junio C Hamano
2015-07-21 20:39 ` Philip Oakley
2015-07-22 22:57 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437432846-5796-3-git-send-email-philipoakley@iee.org \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).