git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 00/17] Make the msvc-build scripts work again
@ 2015-06-25  0:03 Philip Oakley
  2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
                   ` (17 more replies)
  0 siblings, 18 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

This series fixes the scripts which generated Visual Studio project
files. The scripts had bit rotted over the years as other commits
changed the git makefile which it post processed.

The series doesn't attempt to install the Visual Studio compiled product
but allows Windows developers familiar with VS to support the Windows SDK
port of Git.

The fixes are presented in a fine grained manner.

A previous patch series were at $gmane/21132 (2014-11-20), $gmane/21207
(2014-12-26), and on Msysgit list (2015-02-23)
 https://groups.google.com/forum/?hl=en_US?hl%3Den#!topic/msysgit/aiEVBKjRshY
 https://github.com/msysgit/git/pull/318/files

Hopefully it's not too late in the cycle for a review of this contrib/compat
item.

Philip Oakley (17):
  .gitignore: improve MSVC ignore patterns
  .gitignore: ignore library directories created by MSVC VS2008
    buildsystem
  (msvc-build) Vcproj.pm: remove duplicate GUID
  Makefile: a dry-run can error out if no perl. Document the issue
  engine.pl: fix error message (lib->link)
  engine.pl: Avoid complications with perl support
  engine.pl: Properly accept quoted spaces in filenames
  engine.pl: Fix i18n -o option in msvc buildsystem generator
  engine.pl: ignore invalidcontinue.obj which is known to MSVC
  engine.pl: name the msvc buildsystem's makedry error file
  engine.pl: delete the captured stderr file if empty
  engine.pl: add debug line to capture the dry-run
  engine.pl: provide more debug print statements
  Vcproj.pm: list git.exe first to be startup project
  vcbuild/readme: Improve layout and reference msvc-build script
  msvc-build: add complete Microsoft Visual C compilation script
  config.mak.uname: add MSVC No_SafeExeceptionHandler option

 .gitignore                                |  8 ++-
 Makefile                                  |  3 ++
 compat/vcbuild/README                     | 27 +++++++---
 compat/vcbuild/scripts/msvc-build         | 89 +++++++++++++++++++++++++++++++
 config.mak.uname                          |  9 ++++
 contrib/buildsystems/Generators/Vcproj.pm | 34 ++++++------
 contrib/buildsystems/engine.pl            | 37 ++++++++++---
 7 files changed, 174 insertions(+), 33 deletions(-)
 create mode 100644 compat/vcbuild/scripts/msvc-build
 mode change 100755 => 100644 contrib/buildsystems/engine.pl

-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH 01/17] .gitignore: improve MSVC ignore patterns
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25 15:13   ` Junio C Hamano
  2015-06-25  0:03 ` [PATCH 02/17] .gitignore: ignore library directories created by MSVC VS2008 buildsystem Philip Oakley
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Add the Microsoft .manifest pattern, and correct the generic 'Debug'
and 'Release' directory patterns which were mechanically adjusted way
back in c591d5f (gitignore: root most patterns at the top-level directory,
2009-10-26) to allow multi-level projects within the Git suite.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 .gitignore | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 422c538..55498c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -246,5 +246,6 @@
 *.user
 *.idb
 *.pdb
-/Debug/
-/Release/
+*.manifest
+**/Debug/
+**/Release/
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 02/17] .gitignore: ignore library directories created by MSVC VS2008 buildsystem
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
  2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID Philip Oakley
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 55498c1..706d0d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -177,6 +177,7 @@
 /gitweb/gitweb.cgi
 /gitweb/static/gitweb.js
 /gitweb/static/gitweb.min.*
+/libgit
 /test-chmtime
 /test-ctype
 /test-config
@@ -209,6 +210,8 @@
 /test-urlmatch-normalization
 /test-wildmatch
 /common-cmds.h
+/vcs-svn_lib
+/xdiff_lib
 *.tar.gz
 *.dsc
 *.deb
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
  2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
  2015-06-25  0:03 ` [PATCH 02/17] .gitignore: ignore library directories created by MSVC VS2008 buildsystem Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-28  3:05   ` Eric Sunshine
  2015-06-25  0:03 ` [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue Philip Oakley
                   ` (14 subsequent siblings)
  17 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Delete the duplicated GUID from the generation code for the Visual Studio
.sln project file.

The duplicate GUID tended to be allocated to test-svn-fe, which was then
ignored by Visual Studio / MSVC, and it's omission from the build never
noticed.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/Generators/Vcproj.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index cfa74ad..1b01d58 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -52,7 +52,6 @@ my @GUIDS = (
     "{00785268-A9CC-4E40-AC29-BAC0019159CE}",
     "{4C06F56A-DCDB-46A6-B67C-02339935CF12}",
     "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
-    "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
     "{9392EB58-D7BA-410B-B1F0-B2FAA6BC89A7}",
     "{2ACAB2D5-E0CE-4027-BCA0-D78B2D7A6C66}",
     "{86E216C3-43CE-481A-BCB2-BE5E62850635}",
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (2 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25 15:24   ` Junio C Hamano
  2015-06-25  0:03 ` [PATCH 05/17] engine.pl: fix error message (lib->link) Philip Oakley
                   ` (13 subsequent siblings)
  17 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

A 'make -n' dry-run is used as part of the /compat/vcbuild and
/contrib/buildsystems code. The commit ee9be06 (perl: detect new files
in MakeMaker builds, 2012-07-27) was not aware of that dry-run usage
and thus would not execute the target.

Add a comment to the make file stating the issue and the available
solutions of either NO_PERL or a '+recipe'.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 149f1c7..22108bb 100644
--- a/Makefile
+++ b/Makefile
@@ -1746,6 +1746,9 @@ $(SCRIPT_PERL_GEN): perl/perl.mak
 
 perl/perl.mak: perl/PM.stamp
 
+# 'make -n' (dry-run) will not execute this target which creates/updates the PM.stamp file.
+# To avoid the error of failing to find the target PM.stamp, either use NO_PERL=1 (YesPlease),
+# or add a leading '+' to the recipe '+$(QUIET_GEN)$(FIND) perl ...' so that it is executed.
 perl/PM.stamp: FORCE
 	@$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
 	{ cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 05/17] engine.pl: fix error message (lib->link)
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (3 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 06/17] engine.pl: Avoid complications with perl support Philip Oakley
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 23da787..5398315 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -329,7 +329,7 @@ sub handleLinkLine
         } elsif ($part =~ /\.(o|obj)$/) {
             push(@objfiles, $part);
         } else {
-            die "Unhandled lib option @ line $lineno: $part";
+            die "Unhandled link option @ line $lineno: *$part*";
         }
     }
 #    print "AppOut: '$appout'\nLFlags: @lflags\nLibs  : @libs\nOfiles: @objfiles\n";
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 06/17] engine.pl: Avoid complications with perl support
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (4 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 05/17] engine.pl: fix error message (lib->link) Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 07/17] engine.pl: Properly accept quoted spaces in filenames Philip Oakley
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

ee9be06 (perl: detect new files in MakeMaker builds, 2012-07-27)
did not include dry-run support for the generation of the PM.stamp
file, though the dry-run output is used by the build engine.

Disable the perl processing during the dry-run to avoid the issue.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 5398315..4d0a616 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -72,7 +72,7 @@ Running GNU Make to figure out build structure...
 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;
+@makedry = `cd $git_dir && make -n MSVC=1 NO_PERL=1 V=1 2>/dev/null` if !@makedry;
 
 # Parse the make output into usable info
 parseMakeOutput();
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 07/17] engine.pl: Properly accept quoted spaces in filenames
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (5 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 06/17] engine.pl: Avoid complications with perl support Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 08/17] engine.pl: Fix i18n -o option in msvc buildsystem generator Philip Oakley
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

The engine.pl script barfs on the properly quoted spaces in
filename options prevalent on Windows. Use shellwords() rather
than split() to separate such options.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
$gamane/21145 & $gmane/21147
---
 contrib/buildsystems/engine.pl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 4d0a616..ccb59fd 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -12,6 +12,7 @@ use File::Basename;
 use File::Spec;
 use Cwd;
 use Generators;
+use Text::ParseWords;
 
 my (%build_structure, %compile_options, @makedry);
 my $out_dir = getcwd();
@@ -231,7 +232,7 @@ sub removeDuplicates
 sub handleCompileLine
 {
     my ($line, $lineno) = @_;
-    my @parts = split(' ', $line);
+    my @parts = shellwords($line);
     my $sourcefile;
     shift(@parts); # ignore cmd
     while (my $part = shift @parts) {
@@ -265,7 +266,7 @@ sub handleLibLine
     my (@objfiles, @lflags, $libout, $part);
     # kill cmd and rm 'prefix'
     $line =~ s/^rm -f .* && .* rcs //;
-    my @parts = split(' ', $line);
+    my @parts = shellwords($line);
     while ($part = shift @parts) {
         if ($part =~ /^-/) {
             push(@lflags, $part);
@@ -306,7 +307,7 @@ sub handleLinkLine
 {
     my ($line, $lineno) = @_;
     my (@objfiles, @lflags, @libs, $appout, $part);
-    my @parts = split(' ', $line);
+    my @parts = shellwords($line);
     shift(@parts); # ignore cmd
     while ($part = shift @parts) {
         if ($part =~ /^-IGNORE/) {
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 08/17] engine.pl: Fix i18n -o option in msvc buildsystem generator
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (6 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 07/17] engine.pl: Properly accept quoted spaces in filenames Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 09/17] engine.pl: ignore invalidcontinue.obj which is known to MSVC Philip Oakley
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

The i18n 5e9637c (i18n: add infrastructure for translating
Git with gettext, 2011-11-18) introduced an extra '-o' option
into the make file.

If the msvc buildsystem is run without NO_GETTEXT being set
then this broke the engine.pl code for extracting the git.sln
for msvc gui-IDE. The setting of NO_GETTEXT was not fixed until
later, relative to the Msysgit project where this issue was being
investigated.

The presence of these options in the Makefile output should not
compromise the derived build structure. They should be ignored.

Add tests to remove these non linker options, in same vein as
74cf9bd (engine.pl: Fix a recent breakage of the buildsystem
generator, 2010-01-22).

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index ccb59fd..73f2472 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -141,6 +141,12 @@ sub parseMakeOutput
             next;
         }
 
+        if ($text =~ /^(mkdir|msgfmt) /) {
+            # options to the Portable Object translations
+            # the line "mkdir ... && msgfmt ..." contains no linker options
+            next;
+        }
+
         if($text =~ / -c /) {
             # compilation
             handleCompileLine($text, $line);
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 09/17] engine.pl: ignore invalidcontinue.obj which is known to MSVC
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (7 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 08/17] engine.pl: Fix i18n -o option in msvc buildsystem generator Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 10/17] engine.pl: name the msvc buildsystem's makedry error file Philip Oakley
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Commit 4b623d8 (MSVC: link in invalidcontinue.obj for better
POSIX compatibility, 2014-03-29) is not processed correctly
by the buildsystem. Ignore it.

Also split the .o and .obj processing; 'make' does not produce .obj
files. Only substitute filenames ending with .o when generating the
source .c filename.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 73f2472..e8aa8ea 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -289,7 +289,7 @@ sub handleLibLine
 #    exit(1);
     foreach (@objfiles) {
         my $sourcefile = $_;
-        $sourcefile =~ s/\.o/.c/;
+        $sourcefile =~ s/\.o$/.c/;
         push(@sources, $sourcefile);
         push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
         push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});
@@ -333,8 +333,12 @@ sub handleLinkLine
         } elsif ($part =~ /\.(a|lib)$/) {
             $part =~ s/\.a$/.lib/;
             push(@libs, $part);
-        } elsif ($part =~ /\.(o|obj)$/) {
+        } elsif ($part eq 'invalidcontinue.obj') {
+            # ignore - known to MSVC
+        } elsif ($part =~ /\.o$/) {
             push(@objfiles, $part);
+        } elsif ($part =~ /\.obj$/) {
+            # do nothing, 'make' should not be producing .obj, only .o files
         } else {
             die "Unhandled link option @ line $lineno: *$part*";
         }
@@ -343,7 +347,7 @@ sub handleLinkLine
 #    exit(1);
     foreach (@objfiles) {
         my $sourcefile = $_;
-        $sourcefile =~ s/\.o/.c/;
+        $sourcefile =~ s/\.o$/.c/;
         push(@sources, $sourcefile);
         push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
         push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 10/17] engine.pl: name the msvc buildsystem's makedry error file
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (8 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 09/17] engine.pl: ignore invalidcontinue.obj which is known to MSVC Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 11/17] engine.pl: delete the captured stderr file if empty Philip Oakley
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Save the stderr from the dry MSVC make to a well named file for
later review. Use 'msvc-build-makedryerrors.txt' which should be
obvious as to its source, and is not ignored by 'git status'.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
 mode change 100755 => 100644 contrib/buildsystems/engine.pl

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
old mode 100755
new mode 100644
index e8aa8ea..7eba870
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -73,7 +73,10 @@ Running GNU Make to figure out build structure...
 EOM
 
 # Pipe a make --dry-run into a variable, if not already loaded from file
-@makedry = `cd $git_dir && make -n MSVC=1 NO_PERL=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 = `cd $git_dir && make -n MSVC=1 NO_PERL=1 V=1 2>$ErrsFile` if !@makedry;
 
 # Parse the make output into usable info
 parseMakeOutput();
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 11/17] engine.pl: delete the captured stderr file if empty
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (9 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 10/17] engine.pl: name the msvc buildsystem's makedry error file Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 12/17] engine.pl: add debug line to capture the dry-run Philip Oakley
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

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.

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 <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 7eba870..27884f7 100644
--- 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 NO_PERL=1 V=1 2>$ErrsFile` if !@makedry;
+# test for an empty Errors file and remove it
+for ($ErrsFile) {unlink $_ if (-f $_) && (!-s $_);}
 
 # Parse the make output into usable info
 parseMakeOutput();
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 12/17] engine.pl: add debug line to capture the dry-run
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (10 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 11/17] engine.pl: delete the captured stderr file if empty Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Add a debug suggestion for capturing to file the stdout from the dry-run
of the make file used in determining the msvc-build structure for easy
debugging.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 27884f7..7a2aeef 100644
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -76,6 +76,7 @@ EOM
 # Capture the make dry stderr to file for review (will be empty for a release build).
 
 my $ErrsFile = "msvc-build-makedryerrors.txt";
+#@makedry = `cd $git_dir && make -n MSVC=1 NO_PERL=1 V=1 1>makedry.txt 2>$ErrsFile`; # capture the dry run as a text file
 @makedry = `cd $git_dir && make -n MSVC=1 NO_PERL=1 V=1 2>$ErrsFile` if !@makedry;
 # test for an empty Errors file and remove it
 for ($ErrsFile) {unlink $_ if (-f $_) && (!-s $_);}
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 13/17] engine.pl: provide more debug print statements
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (11 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 12/17] engine.pl: add debug line to capture the dry-run Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-29 21:27   ` Sebastian Schuberth
                     ` (2 more replies)
  2015-06-25  0:03 ` [PATCH 14/17] Vcproj.pm: list git.exe first to be startup project Philip Oakley
                   ` (4 subsequent siblings)
  17 siblings, 3 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Assist developers transitioning between the two cultures
by including appropriate, but commented out, debug statements.

The exception is when an unhandled compiler option is detected,
where printing of the full line will supplement the line number and
option part. Otherwise the OP has no immediate mechanism for
inspecting the relevant part of the makedry output.

These debug print statements act as a guide for a poor man's --verbose
option. The test suite doesn't cover the contrib/buildsystems (or
Msysgit's msvc-build) contributions so fails to notice breakages there-in.

It is doubly hard to get developers to ride both horses so, contrary to
normal convention, retain selected debug statements as a safety net for
those willing to try.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 7a2aeef..ac2970a 100644
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -41,6 +41,7 @@ EOM
 # Parse command-line options
 while (@ARGV) {
     my $arg = shift @ARGV;
+	#print "Arg: $arg \n";
     if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
 	showUsage();
 	exit(0);
@@ -129,6 +130,7 @@ sub parseMakeOutput
     print "Parsing GNU Make output to figure out build structure...\n";
     my $line = 0;
     while (my $text = shift @makedry) {
+		#print "Make: $text\n"; # show the makedry line
         my $ate_next;
         do {
             $ate_next = 0;
@@ -263,6 +265,7 @@ sub handleCompileLine
         } elsif ($part =~ /\.(c|cc|cpp)$/) {
             $sourcefile = $part;
         } else {
+            print "full line: $line\n";
             die "Unhandled compiler option @ line $lineno: $part";
         }
     }
@@ -288,6 +291,7 @@ sub handleLibLine
             $libout = $part;
             $libout =~ s/\.a$//;
         } else {
+            print "full line: $line\n";
             die "Unhandled lib option @ line $lineno: $part";
         }
     }
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 14/17] Vcproj.pm: list git.exe first to be startup project
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (12 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 15/17] vcbuild/readme: Improve layout and reference msvc-build script Philip Oakley
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Visual Studio take the first listed application/library as the default
startup project [1]. Parse the application list for git.exe, then list
the libraries, then the other git dashed forms in the git.sln file.

Detect the 'git' project and place it the head of the apps list, rather
than the tail.

Export the apps list before libs list for both the projects and global
structures of the .sln file.

[1] http://stackoverflow.com/questions/1238553/
vs2008-where-is-the-startup-project-setting-stored-for-a-solution
    "In the solution file, there are a list of pseudo-XML "Project"
    entries. It turns out that whatever is the first one ends up as
    the Startup Project, unless it’s overridden in the suo file. Argh.
    I just rearranged the order in the file and it’s good."

    "just moving the pseudo-xml isn't enough. You also have to move the
    group of entries in the "GlobalSection(ProjectConfigurationPlatforms)
    = postSolution" group that has the GUID of the project you moved to
    the top. So there are two places to move lines."

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/Generators/Vcproj.pm | 33 ++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
index 1b01d58..cc2fa21 100644
--- a/contrib/buildsystems/Generators/Vcproj.pm
+++ b/contrib/buildsystems/Generators/Vcproj.pm
@@ -560,20 +560,18 @@ sub createGlueProject {
     foreach (@apps) {
         $_ =~ s/\//_/g;
         $_ =~ s/\.exe//;
-        push(@tmp, $_);
+        if ($_ eq "git" ) {
+            unshift(@tmp, $_);
+        } else {
+            push(@tmp, $_);
+        }
     }
     @apps = @tmp;
 
     open F, ">git.sln" || die "Could not open git.sln for writing!\n";
     binmode F, ":crlf";
     print F "$SLN_HEAD";
-    foreach (@libs) {
-        my $libname = $_;
-        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
-        print F "$SLN_PRE";
-        print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
-        print F "$SLN_POST";
-    }
+
     my $uuid_libgit = $build_structure{"LIBS_libgit_GUID"};
     my $uuid_xdiff_lib = $build_structure{"LIBS_xdiff_lib_GUID"};
     foreach (@apps) {
@@ -587,6 +585,13 @@ sub createGlueProject {
         print F "	EndProjectSection";
         print F "$SLN_POST";
     }
+    foreach (@libs) {
+        my $libname = $_;
+        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
+        print F "$SLN_PRE";
+        print F "\"${libname}\", \"${libname}\\${libname}.vcproj\", \"${uuid}\"";
+        print F "$SLN_POST";
+    }
 
     print F << "EOM";
 Global
@@ -598,17 +603,17 @@ EOM
     print F << "EOM";
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 EOM
-    foreach (@libs) {
-        my $libname = $_;
-        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
+    foreach (@apps) {
+        my $appname = $_;
+        my $uuid = $build_structure{"APPS_${appname}_GUID"};
         print F "\t\t${uuid}.Debug|Win32.ActiveCfg = Debug|Win32\n";
         print F "\t\t${uuid}.Debug|Win32.Build.0 = Debug|Win32\n";
         print F "\t\t${uuid}.Release|Win32.ActiveCfg = Release|Win32\n";
         print F "\t\t${uuid}.Release|Win32.Build.0 = Release|Win32\n";
     }
-    foreach (@apps) {
-        my $appname = $_;
-        my $uuid = $build_structure{"APPS_${appname}_GUID"};
+    foreach (@libs) {
+        my $libname = $_;
+        my $uuid = $build_structure{"LIBS_${libname}_GUID"};
         print F "\t\t${uuid}.Debug|Win32.ActiveCfg = Debug|Win32\n";
         print F "\t\t${uuid}.Debug|Win32.Build.0 = Debug|Win32\n";
         print F "\t\t${uuid}.Release|Win32.ActiveCfg = Release|Win32\n";
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 15/17] vcbuild/readme: Improve layout and reference msvc-build script
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (13 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 14/17] Vcproj.pm: list git.exe first to be startup project Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 16/17] msvc-build: add complete Microsoft Visual C compilation script Philip Oakley
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Layout the 'either/or' with more white space to clarify
which alternatives are matched up.

Reference the Msysgit build script which automates one sequence of options.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 compat/vcbuild/README | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index df8a657..7548dc4 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -3,20 +3,24 @@ The Steps of Build Git with VS2008
 1. You need the build environment, which contains the Git dependencies
    to be able to compile, link and run Git with MSVC.
 
-   You can either use the binary repository:
+   You can either:
+      use the binary repository:
 
        WWW: http://repo.or.cz/w/msvcgit.git
        Git: git clone git://repo.or.cz/msvcgit.git
        Zip: http://repo.or.cz/w/msvcgit.git?a=snapshot;h=master;sf=zip
 
-   and call the setup_32bit_env.cmd batch script before compiling Git,
-   (see repo/package README for details), or the source repository:
+      and call the setup_32bit_env.cmd batch script before compiling Git,
+     (see repo/package README for details),
+
+   or:
+      use the source repository:
 
        WWW: http://repo.or.cz/w/gitbuild.git
        Git: git clone git://repo.or.cz/gitbuild.git
        Zip: (None, as it's a project with submodules)
 
-   and build the support libs as instructed in that repo/package.
+     and build the support libs as instructed in that repo/package.
 
 2. Ensure you have the msysgit environment in your path, so you have
    GNU Make, bash and perl available.
@@ -33,18 +37,25 @@ The Steps of Build Git with VS2008
        make common-cmds.h
    to generate the common-cmds.h file needed to compile git.
 
-4. Then either build Git with the GNU Make Makefile in the Git projects
-   root
+4. Then either
+
+     build Git with the GNU Make Makefile in the Git projects root
        make MSVC=1
-   or generate Visual Studio solution/projects (.sln/.vcproj) with the
+   or
+
+   generate Visual Studio solution/projects (.sln/.vcproj) with the
    command
        perl contrib/buildsystems/generate -g Vcproj
    and open and build the solution with the IDE
        devenv git.sln /useenv
-   or build with the IDE build engine directly from the command line
+     or
+
+   build with the IDE build engine directly from the command line
        devenv git.sln /useenv /build "Release|Win32"
    The /useenv option is required, so Visual Studio picks up the
    environment variables for the support libraries required to build
    Git, which you set up in step 1.
 
 Done!
+
+Or, use the Msysgit msvc-build script; available from that project.
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 16/17] msvc-build: add complete Microsoft Visual C compilation script
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (14 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 15/17] vcbuild/readme: Improve layout and reference msvc-build script Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25  0:03 ` [PATCH 17/17] config.mak.uname: add MSVC No_SafeExeceptionHandler option Philip Oakley
  2015-06-25 15:10 ` [PATCH 00/17] Make the msvc-build scripts work again Junio C Hamano
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Implement the README to facilitate cross community development.
Include comments for those Windows folks not yet fully familiar
with bash commands.

This is identical to the msysgit script, except for the 'cd toplevel'
step, and comments for the edification of converts from Windows.
Original author: Johannes Schindelin (2011-11-01 3142da4 : Add a script
to make the MSVC build more convenient).

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---

TODO:
Also resolve the cleaning of newer VS2010 products.
---
 compat/vcbuild/README             |  2 +-
 compat/vcbuild/scripts/msvc-build | 89 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 1 deletion(-)
 create mode 100644 compat/vcbuild/scripts/msvc-build

diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index 7548dc4..faaea69 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -58,4 +58,4 @@ The Steps of Build Git with VS2008
 
 Done!
 
-Or, use the Msysgit msvc-build script; available from that project.
+Or, use the msvc-build script; available from /compat/vcbuild/scripts/.
diff --git a/compat/vcbuild/scripts/msvc-build b/compat/vcbuild/scripts/msvc-build
new file mode 100644
index 0000000..52b925d
--- /dev/null
+++ b/compat/vcbuild/scripts/msvc-build
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# This msvc-build command should be executed from the msysgit directory level
+# This is so that the 'cd/git' step works and the subequent operations have the right msysgit super directory.
+set -e # Exit immediately if a command exits with a nonzero exit status.
+
+gui=
+clean=
+while test $# -gt 0
+do
+	case "$1" in
+	--gui|--dev|--devenv|--vs|--visual-studio)
+		gui=t
+		;;
+	clean)
+		clean=t
+		;;
+	*)
+		echo "Usage: $0 [--vs] [clean]" >&2
+		exit 1
+		;;
+	esac
+	shift
+done
+
+cd $(git rev-parse --show-toplevel)
+
+case "$clean" in
+t)
+	case "$gui" in
+	t)
+		rm -rf git.sln libgit
+		# remove all the new VS2010 stuff as well
+		# rm -rf git.sdf
+		;;
+	'')
+		make clean
+		# surely needs "make clean MSVC=1"
+		# otherwise it could assume the wrong make products [MinGW vs Windows].
+		;;
+	esac
+	exit
+	;;
+esac
+
+to_ignore="$(git ls-files --other --exclude-standard msvcgit msvc-build.cmd)"
+test -z "$to_ignore" || {
+	mkdir -p .git/info &&
+	echo "$to_ignore" |
+	sed 's/^/\//' >> .git/info/exclude
+} || exit
+
+test -d msvcgit || git clone git://repo.or.cz/msvcgit.git
+
+vsvars=
+# assume cl.exe will populate its relevant environment variables
+# if cl.exe does not exist, populate vsvars with the most recent Visual Studio path
+type cl.exe 2> /dev/null ||
+vsvars="$(ls -t \
+	"$PROGRAMFILES/Microsoft Visual Studio"*/Common7/Tools/vsvars32.bat |
+	head -n 1)"
+
+
+config_mak=
+# if a config.mak file (dot, not underscore) exists, back it up,
+# remember the backup file name in config_mak.
+test -f config.mak &&
+config_mak=config.mak.bup.$$ &&
+mv config.mak $config_mak
+
+cat > config.mak << EOF
+CFLAGS += -Imsvcgit/32bits/include
+LDFLAGS += -Lmsvcgit/32bits/lib
+EOF
+
+echo "call \"$vsvars\"" > msvc-build.cmd
+if test -z "$gui"
+then
+	echo 'make MSVC=1' >> msvc-build.cmd
+else
+	echo 'perl contrib/buildsystems/generate -g Vcproj' >> msvc-build.cmd
+	echo 'start git.sln' >> msvc-build.cmd
+fi
+
+cmd /c msvc-build.cmd
+
+# if we made a backup file (name in config_mak), then restore it.
+test -z "$config_mak" ||
+mv $config_mak config.mak
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 17/17] config.mak.uname: add MSVC No_SafeExeceptionHandler option
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (15 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 16/17] msvc-build: add complete Microsoft Visual C compilation script Philip Oakley
@ 2015-06-25  0:03 ` Philip Oakley
  2015-06-25 15:10 ` [PATCH 00/17] Make the msvc-build scripts work again Junio C Hamano
  17 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25  0:03 UTC (permalink / raw)
  To: GitList; +Cc: MsysGitList, Philip Oakley

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 config.mak.uname | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/config.mak.uname b/config.mak.uname
index 943c439..1c27828 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -1,5 +1,9 @@
 # Platform specific Makefile tweaks based on uname detection
 
+# Define NO_SAFESEH if you need MSVC/Visual Studio to ignore the lack of
+# Microsoft's Safe Exception Handling in libraries (such as zlib).
+# Typically required for VS2013+/32-bit compilation on Vista+ versions.
+
 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
 uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
 uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
@@ -385,6 +389,11 @@ ifeq ($(uname_S),Windows)
 	PTHREAD_LIBS =
 	lib =
 	BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
+
+ifdef NO_SAFESEH
+	LDFLAGS += -SAFESEH:NO
+endif
+
 ifndef DEBUG
 	BASIC_CFLAGS += -GL -Os -MD
 	BASIC_LDFLAGS += -LTCG
-- 
2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 00/17] Make the msvc-build scripts work again
  2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
                   ` (16 preceding siblings ...)
  2015-06-25  0:03 ` [PATCH 17/17] config.mak.uname: add MSVC No_SafeExeceptionHandler option Philip Oakley
@ 2015-06-25 15:10 ` Junio C Hamano
  2015-06-25 19:31   ` Philip Oakley
  17 siblings, 1 reply; 34+ messages in thread
From: Junio C Hamano @ 2015-06-25 15:10 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

Philip Oakley <philipoakley@iee.org> writes:

> Hopefully it's not too late in the cycle for a review of this contrib/compat
> item.

Has this been discussed in the Windows land and folks are all happy
with this change?  If so the only thing we would need review on the
main list is the top-level change outside compat/ and contrib/, so
it may be possible to sneak it in before -rc1.

Otherwise, no, but we can still polish it during the prerelease
freeze and aim to merge it in the first batch after the upcoming
release.


> Philip Oakley (17):
>   .gitignore: improve MSVC ignore patterns
>   .gitignore: ignore library directories created by MSVC VS2008
>     buildsystem
>   (msvc-build) Vcproj.pm: remove duplicate GUID
>   Makefile: a dry-run can error out if no perl. Document the issue
>   engine.pl: fix error message (lib->link)
>   engine.pl: Avoid complications with perl support
>   engine.pl: Properly accept quoted spaces in filenames
>   engine.pl: Fix i18n -o option in msvc buildsystem generator
>   engine.pl: ignore invalidcontinue.obj which is known to MSVC
>   engine.pl: name the msvc buildsystem's makedry error file
>   engine.pl: delete the captured stderr file if empty
>   engine.pl: add debug line to capture the dry-run
>   engine.pl: provide more debug print statements
>   Vcproj.pm: list git.exe first to be startup project
>   vcbuild/readme: Improve layout and reference msvc-build script
>   msvc-build: add complete Microsoft Visual C compilation script
>   config.mak.uname: add MSVC No_SafeExeceptionHandler option
>
>  .gitignore                                |  8 ++-
>  Makefile                                  |  3 ++
>  compat/vcbuild/README                     | 27 +++++++---
>  compat/vcbuild/scripts/msvc-build         | 89 +++++++++++++++++++++++++++++++
>  config.mak.uname                          |  9 ++++
>  contrib/buildsystems/Generators/Vcproj.pm | 34 ++++++------
>  contrib/buildsystems/engine.pl            | 37 ++++++++++---
>  7 files changed, 174 insertions(+), 33 deletions(-)
>  create mode 100644 compat/vcbuild/scripts/msvc-build


>  mode change 100755 => 100644 contrib/buildsystems/engine.pl

Why?

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns
  2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
@ 2015-06-25 15:13   ` Junio C Hamano
  2015-06-25 19:32     ` Philip Oakley
  0 siblings, 1 reply; 34+ messages in thread
From: Junio C Hamano @ 2015-06-25 15:13 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

Philip Oakley <philipoakley@iee.org> writes:

> Add the Microsoft .manifest pattern, and correct the generic 'Debug'
> and 'Release' directory patterns which were mechanically adjusted way
> back in c591d5f (gitignore: root most patterns at the top-level directory,
> 2009-10-26) to allow multi-level projects within the Git suite.
>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>  .gitignore | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/.gitignore b/.gitignore
> index 422c538..55498c1 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -246,5 +246,6 @@
>  *.user
>  *.idb
>  *.pdb
> -/Debug/
> -/Release/
> +*.manifest
> +**/Debug/
> +**/Release/

Why "**/" there?  Wouldn't

*.manifest
Debug/
Release/

suffice?

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25  0:03 ` [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue Philip Oakley
@ 2015-06-25 15:24   ` Junio C Hamano
  2015-06-25 19:33     ` Philip Oakley
  0 siblings, 1 reply; 34+ messages in thread
From: Junio C Hamano @ 2015-06-25 15:24 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

Philip Oakley <philipoakley@iee.org> writes:

> A 'make -n' dry-run is used as part of the /compat/vcbuild and
> /contrib/buildsystems code. The commit ee9be06 (perl: detect new files
> in MakeMaker builds, 2012-07-27) was not aware of that dry-run usage
> and thus would not execute the target.
>
> Add a comment to the make file stating the issue and the available
> solutions of either NO_PERL or a '+recipe'.

I am not sure what this patch is trying to achieve.

If you are not touching what this Makefile actually does, then I
would imagine that you are running the "buildsystems code" that
actually drives 'make -n' with some "available solution" (perhaps
you are running 'make -n NO_PERL=NoThanks' or something like that)?
Then instead of a command like this that nobody would read in this
file, the same command can instead go there to explain what the
"workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
doing?

I suspect you mean by +recipe that you modify this makefile to make
such a workaround unnecessary?  If that is the case, why isn't such
a change actually be done with this commit, instead of a comment?

I am not sure what this patch is trying to achieve.

Puzzled...

>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>  Makefile | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 149f1c7..22108bb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1746,6 +1746,9 @@ $(SCRIPT_PERL_GEN): perl/perl.mak
>  
>  perl/perl.mak: perl/PM.stamp
>  
> +# 'make -n' (dry-run) will not execute this target which creates/updates the PM.stamp file.
> +# To avoid the error of failing to find the target PM.stamp, either use NO_PERL=1 (YesPlease),
> +# or add a leading '+' to the recipe '+$(QUIET_GEN)$(FIND) perl ...' so that it is executed.
>  perl/PM.stamp: FORCE
>  	@$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
>  	{ cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
> -- 
> 2.3.1
>
> -- 

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 00/17] Make the msvc-build scripts work again
  2015-06-25 15:10 ` [PATCH 00/17] Make the msvc-build scripts work again Junio C Hamano
@ 2015-06-25 19:31   ` Philip Oakley
  0 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-25 19:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GitList, MsysGitList

From: "Junio C Hamano" <gitster@pobox.com>
> Philip Oakley <philipoakley@iee.org> writes:
>
>> Hopefully it's not too late in the cycle for a review of this 
>> contrib/compat
>> item.
>
> Has this been discussed in the Windows land and folks are all happy
> with this change?  If so the only thing we would need review on the
> main list is the top-level change outside compat/ and contrib/, so
> it may be possible to sneak it in before -rc1.

Yes this had been discussed previously on the MsysGit list, and in the 
referenced Pull Request [msysgit/#318] 
https://github.com/msysgit/git/pull/318/files.

I had aspirations of a slightly bigger series that would also allow the 
VS compiled output to be installed but that had stalled, so I cut back 
to fixing the basic 'make it work' steps.

The series has been reordered/rebased, and the recently noticed 05/17 
err msg fix added.

The one unknown is the last patch [17] for the Windows Safe Exception 
Handling in that the default acceptability was flipped in VS2013 so that 
zlib became unacceptable to ceratain OS versions without the addition of 
that option -SAFESEH:NO, but I haven't been able to test that myself (I 
don't have a complaining system).

>
> Otherwise, no, but we can still polish it during the prerelease
> freeze and aim to merge it in the first batch after the upcoming
> release.
>
>
>> Philip Oakley (17):
>>   .gitignore: improve MSVC ignore patterns
>>   .gitignore: ignore library directories created by MSVC VS2008
>>     buildsystem
>>   (msvc-build) Vcproj.pm: remove duplicate GUID
>>   Makefile: a dry-run can error out if no perl. Document the issue
>>   engine.pl: fix error message (lib->link)
>>   engine.pl: Avoid complications with perl support
>>   engine.pl: Properly accept quoted spaces in filenames
>>   engine.pl: Fix i18n -o option in msvc buildsystem generator
>>   engine.pl: ignore invalidcontinue.obj which is known to MSVC
>>   engine.pl: name the msvc buildsystem's makedry error file
>>   engine.pl: delete the captured stderr file if empty
>>   engine.pl: add debug line to capture the dry-run
>>   engine.pl: provide more debug print statements
>>   Vcproj.pm: list git.exe first to be startup project
>>   vcbuild/readme: Improve layout and reference msvc-build script
>>   msvc-build: add complete Microsoft Visual C compilation script
>>   config.mak.uname: add MSVC No_SafeExeceptionHandler option
>>
>>  .gitignore                                |  8 ++-
>>  Makefile                                  |  3 ++
>>  compat/vcbuild/README                     | 27 +++++++---
>>  compat/vcbuild/scripts/msvc-build         | 89 
>> +++++++++++++++++++++++++++++++
>>  config.mak.uname                          |  9 ++++
>>  contrib/buildsystems/Generators/Vcproj.pm | 34 ++++++------
>>  contrib/buildsystems/engine.pl            | 37 ++++++++++---
>>  7 files changed, 174 insertions(+), 33 deletions(-)
>>  create mode 100644 compat/vcbuild/scripts/msvc-build
>
>
>>  mode change 100755 => 100644 contrib/buildsystems/engine.pl
>
> Why?

Mistake on/by Windows? - My mistake, I hadn't noticed it had happened.

I can search out the change step and re-roll.

> --
Philip 

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns
  2015-06-25 15:13   ` Junio C Hamano
@ 2015-06-25 19:32     ` Philip Oakley
  2015-06-25 20:22       ` Junio C Hamano
  0 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25 19:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GitList, MsysGitList

From: "Junio C Hamano" <gitster@pobox.com>
> Philip Oakley <philipoakley@iee.org> writes:
>
>> Add the Microsoft .manifest pattern, and correct the generic 'Debug'
>> and 'Release' directory patterns which were mechanically adjusted way
>> back in c591d5f (gitignore: root most patterns at the top-level 
>> directory,
>> 2009-10-26) to allow multi-level projects within the Git suite.
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>> ---
>>  .gitignore | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/.gitignore b/.gitignore
>> index 422c538..55498c1 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -246,5 +246,6 @@
>>  *.user
>>  *.idb
>>  *.pdb
>> -/Debug/
>> -/Release/
>> +*.manifest
>> +**/Debug/
>> +**/Release/
>
> Why "**/" there?  Wouldn't
>
> *.manifest
> Debug/
> Release/
>
> suffice?
>
Probably. I was thinking of the 'at any level' aspect because some of 
the 'projects' appeared two levels down and weren't caught by the rooted 
ignore. Can change.

--
Philip 

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25 15:24   ` Junio C Hamano
@ 2015-06-25 19:33     ` Philip Oakley
  2015-06-25 20:21       ` Junio C Hamano
  0 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25 19:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GitList, MsysGitList

From: "Junio C Hamano" <gitster@pobox.com>
> Philip Oakley <philipoakley@iee.org> writes:
>
>> A 'make -n' dry-run is used as part of the /compat/vcbuild and
>> /contrib/buildsystems code. The commit ee9be06 (perl: detect new 
>> files
>> in MakeMaker builds, 2012-07-27) was not aware of that dry-run usage
>> and thus would not execute the target.
>>
>> Add a comment to the make file stating the issue and the available
>> solutions of either NO_PERL or a '+recipe'.
>
> I am not sure what this patch is trying to achieve.

It was probably a bit of 'don't mess with working code', given that I'd 
used the NO_PERL solution, rather 'document the issue'. The issue had me 
stuck for a while. The possible use of '+' came later when driving down 
through the Makefile manual.

>
> If you are not touching what this Makefile actually does, then I
> would imagine that you are running the "buildsystems code" that
> actually drives 'make -n' with some "available solution" (perhaps
> you are running 'make -n NO_PERL=NoThanks' or something like that)?
> Then instead of a command like this that nobody would read in this
> file, the same command can instead go there to explain what the
> "workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
> doing?
>
> I suspect you mean by +recipe that you modify this makefile to make
> such a workaround unnecessary?  If that is the case, why isn't such
> a change actually be done with this commit, instead of a comment?

Yes.  See above about the lack of 'fearless coding'; been working in 
real world engineering too long ;-)

>
> I am not sure what this patch is trying to achieve.
>
> Puzzled...
>
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>> ---
>>  Makefile | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index 149f1c7..22108bb 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1746,6 +1746,9 @@ $(SCRIPT_PERL_GEN): perl/perl.mak
>>
>>  perl/perl.mak: perl/PM.stamp
>>
>> +# 'make -n' (dry-run) will not execute this target which 
>> creates/updates the PM.stamp file.
>> +# To avoid the error of failing to find the target PM.stamp, either 
>> use NO_PERL=1 (YesPlease),
>> +# or add a leading '+' to the recipe '+$(QUIET_GEN)$(FIND) perl ...' 
>> so that it is executed.
>>  perl/PM.stamp: FORCE
>>  @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
>>  { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
>> -- 
>> 2.3.1
>>
>> -- 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25 19:33     ` Philip Oakley
@ 2015-06-25 20:21       ` Junio C Hamano
  2015-06-25 23:34         ` Philip Oakley
  0 siblings, 1 reply; 34+ messages in thread
From: Junio C Hamano @ 2015-06-25 20:21 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

"Philip Oakley" <philipoakley@iee.org> writes:

> From: "Junio C Hamano" <gitster@pobox.com>
>>
>> I am not sure what this patch is trying to achieve.
>
> It was probably a bit of 'don't mess with working code', given that
> I'd used the NO_PERL solution, rather 'document the issue'....

Then this part applies, I think.

>> If you are not touching what this Makefile actually does, then I
>> would imagine that you are running the "buildsystems code" that
>> actually drives 'make -n' with some "available solution" (perhaps
>> you are running 'make -n NO_PERL=NoThanks' or something like that)?
>> Then instead of a command like this that nobody would read in this
>> file, the same command can instead go there to explain what the
>> "workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
>> doing?

Thanks.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/17] .gitignore: improve MSVC ignore patterns
  2015-06-25 19:32     ` Philip Oakley
@ 2015-06-25 20:22       ` Junio C Hamano
  0 siblings, 0 replies; 34+ messages in thread
From: Junio C Hamano @ 2015-06-25 20:22 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

"Philip Oakley" <philipoakley@iee.org> writes:

>> Debug/
>> Release/
>>
>> suffice?
>>
> Probably. I was thinking of the 'at any level' aspect...

Yeah, that is exactly the difference between rooted "/Debug/" and
"Debug/" ;-).

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25 20:21       ` Junio C Hamano
@ 2015-06-25 23:34         ` Philip Oakley
  2015-07-14 22:42           ` Philip Oakley
  0 siblings, 1 reply; 34+ messages in thread
From: Philip Oakley @ 2015-06-25 23:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GitList, MsysGitList

From: "Junio C Hamano" <gitster@pobox.com>
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> From: "Junio C Hamano" <gitster@pobox.com>
>>>
>>> I am not sure what this patch is trying to achieve.
>>
>> It was probably a bit of 'don't mess with working code', given that
>> I'd used the NO_PERL solution, rather 'document the issue'....
>
> Then this part applies, I think.
>
>>> If you are not touching what this Makefile actually does, then I
>>> would imagine that you are running the "buildsystems code" that
>>> actually drives 'make -n' with some "available solution" (perhaps
>>> you are running 'make -n NO_PERL=NoThanks' or something like that)?
>>> Then instead of a command like this that nobody would read in this
>>> file, the same command can instead go there to explain what the
>>> "workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
>>> doing?
>
I was more of the view that this was about prevention (here), rather
than retrospective explanation of the code (there).

In my case the errors were showing problems with the PM.stamp in the
makefile (I didn't have the solution at that point).

So either a short comment "#  consider using 'NO_PERL=YesPlease' for dry
run invocations" (beware your double negative ;-), or the addition of
the '+recipe', would still be my preferred change, rather than leaving
the open manhole for others to fall into.

The thread on my difficulties is at $gmane/263656 (2015-02-10 22:51)
"
    At the moment I'm getting (on my old WinXP machine, using Msysgit
    1.9.5 as a basis)

    $ make -n MSVC=1 V=1 1>makedry.txt
    make[1]: *** No rule to make target `PM.stamp', needed by 
`perl.mak'.
    Stop.
    make: *** [perl/perl.mak] Error 2
"
As you can see, at that time the place to look would be the makefile,
so I would do think a 'fix' there would still be appropriate.

Do you have a preference among the three options (comment, +recipe, 
drop)?
--
Philip

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID
  2015-06-25  0:03 ` [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID Philip Oakley
@ 2015-06-28  3:05   ` Eric Sunshine
  2015-06-28  8:44     ` Philip Oakley
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Sunshine @ 2015-06-28  3:05 UTC (permalink / raw)
  To: Philip Oakley; +Cc: GitList, MsysGitList

On Wed, Jun 24, 2015 at 8:03 PM, Philip Oakley <philipoakley@iee.org> wrote:
> Delete the duplicated GUID from the generation code for the Visual Studio
> .sln project file.
>
> The duplicate GUID tended to be allocated to test-svn-fe, which was then
> ignored by Visual Studio / MSVC, and it's omission from the build never

s/it's/its/

> noticed.
>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>  contrib/buildsystems/Generators/Vcproj.pm | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm
> index cfa74ad..1b01d58 100644
> --- a/contrib/buildsystems/Generators/Vcproj.pm
> +++ b/contrib/buildsystems/Generators/Vcproj.pm
> @@ -52,7 +52,6 @@ my @GUIDS = (
>      "{00785268-A9CC-4E40-AC29-BAC0019159CE}",
>      "{4C06F56A-DCDB-46A6-B67C-02339935CF12}",
>      "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
> -    "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
>      "{9392EB58-D7BA-410B-B1F0-B2FAA6BC89A7}",
>      "{2ACAB2D5-E0CE-4027-BCA0-D78B2D7A6C66}",
>      "{86E216C3-43CE-481A-BCB2-BE5E62850635}",
> --
> 2.3.1

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID
  2015-06-28  3:05   ` Eric Sunshine
@ 2015-06-28  8:44     ` Philip Oakley
  0 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-06-28  8:44 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: GitList, MsysGitList

From: "Eric Sunshine" <sunshine@sunshineco.com>
> On Wed, Jun 24, 2015 at 8:03 PM, Philip Oakley <philipoakley@iee.org> 
> wrote:
>> Delete the duplicated GUID from the generation code for the Visual 
>> Studio
>> .sln project file.
>>
>> The duplicate GUID tended to be allocated to test-svn-fe, which was 
>> then
>> ignored by Visual Studio / MSVC, and it's omission from the build 
>> never
>
> s/it's/its/

Thanks, will fix.
>
>> noticed.
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>> ---
>>  contrib/buildsystems/Generators/Vcproj.pm | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/contrib/buildsystems/Generators/Vcproj.pm 
>> b/contrib/buildsystems/Generators/Vcproj.pm
>> index cfa74ad..1b01d58 100644
>> --- a/contrib/buildsystems/Generators/Vcproj.pm
>> +++ b/contrib/buildsystems/Generators/Vcproj.pm
>> @@ -52,7 +52,6 @@ my @GUIDS = (
>>      "{00785268-A9CC-4E40-AC29-BAC0019159CE}",
>>      "{4C06F56A-DCDB-46A6-B67C-02339935CF12}",
>>      "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
>> -    "{3A62D3FD-519E-4EC9-8171-D2C1BFEA022F}",
>>      "{9392EB58-D7BA-410B-B1F0-B2FAA6BC89A7}",
>>      "{2ACAB2D5-E0CE-4027-BCA0-D78B2D7A6C66}",
>>      "{86E216C3-43CE-481A-BCB2-BE5E62850635}",
>> --
>> 2.3.1
> 

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 13/17] engine.pl: provide more debug print statements
  2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
@ 2015-06-29 21:27   ` Sebastian Schuberth
  2015-07-07 22:18     ` Philip Oakley
  2015-06-29 21:31   ` Sebastian Schuberth
  2015-06-29 21:33   ` Sebastian Schuberth
  2 siblings, 1 reply; 34+ messages in thread
From: Sebastian Schuberth @ 2015-06-29 21:27 UTC (permalink / raw)
  To: msysgit; +Cc: git

On 25.06.2015 02:03, Philip Oakley wrote:

> --- a/contrib/buildsystems/engine.pl
> +++ b/contrib/buildsystems/engine.pl
> @@ -41,6 +41,7 @@ EOM
>   # Parse command-line options
>   while (@ARGV) {
>       my $arg = shift @ARGV;
> +	#print "Arg: $arg \n";
>       if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
>   	showUsage();
>   	exit(0);
> @@ -129,6 +130,7 @@ sub parseMakeOutput
>       print "Parsing GNU Make output to figure out build structure...\n";
>       my $line = 0;
>       while (my $text = shift @makedry) {
> +		#print "Make: $text\n"; # show the makedry line

Please never commit code that's been commented out. Also see

http://dev.solita.fi/2013/07/04/whats-in-a-good-commit.html

;-)

-- 
Sebastian Schuberth

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 13/17] engine.pl: provide more debug print statements
  2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
  2015-06-29 21:27   ` Sebastian Schuberth
@ 2015-06-29 21:31   ` Sebastian Schuberth
  2015-06-29 21:33   ` Sebastian Schuberth
  2 siblings, 0 replies; 34+ messages in thread
From: Sebastian Schuberth @ 2015-06-29 21:31 UTC (permalink / raw)
  To: msysgit; +Cc: git

On 25.06.2015 02:03, Philip Oakley wrote:

> --- a/contrib/buildsystems/engine.pl
> +++ b/contrib/buildsystems/engine.pl
> @@ -41,6 +41,7 @@ EOM
>   # Parse command-line options
>   while (@ARGV) {
>       my $arg = shift @ARGV;
> +	#print "Arg: $arg \n";
>       if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
>   	showUsage();
>   	exit(0);
> @@ -129,6 +130,7 @@ sub parseMakeOutput
>       print "Parsing GNU Make output to figure out build structure...\n";
>       my $line = 0;
>       while (my $text = shift @makedry) {
> +		#print "Make: $text\n"; # show the makedry line

Please never commit code that's been commented out. Also see

http://dev.solita.fi/2013/07/04/whats-in-a-good-commit.html

;-)

-- 
Sebastian Schuberth

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 13/17] engine.pl: provide more debug print statements
  2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
  2015-06-29 21:27   ` Sebastian Schuberth
  2015-06-29 21:31   ` Sebastian Schuberth
@ 2015-06-29 21:33   ` Sebastian Schuberth
  2 siblings, 0 replies; 34+ messages in thread
From: Sebastian Schuberth @ 2015-06-29 21:33 UTC (permalink / raw)
  To: msysgit; +Cc: git

On 25.06.2015 02:03, Philip Oakley wrote:

> --- a/contrib/buildsystems/engine.pl
> +++ b/contrib/buildsystems/engine.pl
> @@ -41,6 +41,7 @@ EOM
>   # Parse command-line options
>   while (@ARGV) {
>       my $arg = shift @ARGV;
> +	#print "Arg: $arg \n";
>       if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
>   	showUsage();
>   	exit(0);
> @@ -129,6 +130,7 @@ sub parseMakeOutput
>       print "Parsing GNU Make output to figure out build structure...\n";
>       my $line = 0;
>       while (my $text = shift @makedry) {
> +		#print "Make: $text\n"; # show the makedry line

Please never commit code that's been commented out. Also see

http://dev.solita.fi/2013/07/04/whats-in-a-good-commit.html

;-)

-- 
Sebastian Schuberth

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: Re: [PATCH 13/17] engine.pl: provide more debug print statements
  2015-06-29 21:27   ` Sebastian Schuberth
@ 2015-07-07 22:18     ` Philip Oakley
  0 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-07-07 22:18 UTC (permalink / raw)
  To: Git MsysGit, Sebastian Schuberth; +Cc: Git List

From: "Sebastian Schuberth" <sschuberth@gmail.com>
> On 25.06.2015 02:03, Philip Oakley wrote:
>
>> --- a/contrib/buildsystems/engine.pl
>> +++ b/contrib/buildsystems/engine.pl
>> @@ -41,6 +41,7 @@ EOM
>>   # Parse command-line options
>>   while (@ARGV) {
>>       my $arg = shift @ARGV;
>> + #print "Arg: $arg \n";
>>       if ("$arg" eq "-h" || "$arg" eq "--help" || "$arg" eq "-?") {
>>   showUsage();
>>   exit(0);
>> @@ -129,6 +130,7 @@ sub parseMakeOutput
>>       print "Parsing GNU Make output to figure out build
>> structure...\n";
>>       my $line = 0;
>>       while (my $text = shift @makedry) {
>> + #print "Make: $text\n"; # show the makedry line
>
> Please never commit code that's been commented out. Also see
>
> http://dev.solita.fi/2013/07/04/whats-in-a-good-commit.html
>
> ;-)

The gif was fun, even if it's a little OTT. It does smack of religious
dogma though ;-)

>
> -- 

Hi Sebastian,

It's "deactivated code", not dead code [1].

I'd deliberately included this 'code', as per the commit message because
I saw this as a clear part of aiding future maintenance, and it matches
the rest of the code style, i.e. the judicious placement of a comment
that says 'here's the place to pick out the status when debugging' -
perhaps it's my engineering experience that sees the benefits.

These were the key debug points I used - other's I've removed from the 
series.

Philip


[1] In one of the replies to
http://embeddedgurus.com/barr-code/2013/02/dead-code-the-law-and-unintended-consequences/

:>> as per DO178B safety critical software development guideline
document Terms "Dead code" and "Deactivated Code" have distinct 
meanings:

Dead code : Dead code is source code (and it is a part of binary code)
that is not executed in the final system and it will be not having
traceability to any requirements (one can say unintentional code).

Deactivated code: code which is commented out or removed via #ifdef's
(it is not a part of final binary code) and it will be having
traceability to its low level requirements (its a intentional code and
it can be activated in some configurations through hardware traps for
debugging or other purposes.


-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue
  2015-06-25 23:34         ` Philip Oakley
@ 2015-07-14 22:42           ` Philip Oakley
  0 siblings, 0 replies; 34+ messages in thread
From: Philip Oakley @ 2015-07-14 22:42 UTC (permalink / raw)
  To: Philip Oakley, Junio C Hamano; +Cc: GitList, MsysGitList

From: "Philip Oakley" <philipoakley@iee.org>
Sent: Friday, June 26, 2015 12:34 AM
> From: "Junio C Hamano" <gitster@pobox.com>
>> "Philip Oakley" <philipoakley@iee.org> writes:
>>
>>> From: "Junio C Hamano" <gitster@pobox.com>
>>>>
>>>> I am not sure what this patch is trying to achieve.

I have been able to repeat the issue, more below.

>>>
>>> It was probably a bit of 'don't mess with working code', given that
>>> I'd used the NO_PERL solution, rather 'document the issue'....
>>
>> Then this part applies, I think.
>>
>>>> If you are not touching what this Makefile actually does, then I
>>>> would imagine that you are running the "buildsystems code" that
>>>> actually drives 'make -n' with some "available solution" (perhaps
>>>> you are running 'make -n NO_PERL=NoThanks' or something like that)?
>>>> Then instead of a command like this that nobody would read in this
>>>> file, the same command can instead go there to explain what the
>>>> "workaround" (e.g. unusual-looking 'make -n NO_PERL=NoThanks') is
>>>> doing?

The command sequence:
 $ git clean -dfx
 $ make -n MSVC=1 V=1 2>ErrsFile.txt 1>MakeDry.txt

produces the error
 make[1]: *** No rule to make target 'PM.stamp', needed by 'perl.mak'. 
Stop.
 make: *** [perl/perl.mak] Error 2

the actual MakeDry.txt reaches

 echo "$FLAGS" >GIT-CFLAGS; \
            fi
 make[2]: Leaving directory '/c/msysgit195/git'
 make[1]: Leaving directory '/c/msysgit195/git/perl'
 Makefile:1758: recipe for target 'perl/perl.mak' failed

My understanding of the error is that, first, the PM.stamp is removed by 
the clean, then the dryrun has by the error time passed the initial 
PM.stamp update code, but doesn't execute it (being a dry run), thus the 
file PM.stamp still does not exist.

The makefile then descends into the 'perl/Makefile' pre-requisite to 
'perl/perl.mak', and (IIUC) at this point the L25#$(makfile): PM.stamp 
then barfs because there is no PM.stamp to be a prerequisite for that 
line.

As noted in the patch, my response at the time (not fully understanding 
why) was simply to annotate the Makefile's PM.stamp (which is where the 
error would first leads any future debugging).

Possibly other options would be to add an extra PM.stamp target which, 
for a dry-run (+recipe), creates any empty PM.stamp file if one does not 
exist, simply to allow the perl/perl.mak to succeed. Or perhaps simply 
add the PM.stamp file to the code (or maybe not).

A third option would be to simply convert the PM.stamp recipe to a 
+recipe so that it's executed during the dry-run, but that may be 
contrary to the idea of being a dry-run.

Do you have any preference for how I should resolve this? Ideally I like 
to drop the use of the NO_PERL in the dry run.

--
Philip

>>
> I was more of the view that this was about prevention (here), rather
> than retrospective explanation of the code (there).
>
> In my case the errors were showing problems with the PM.stamp in the
> makefile (I didn't have the solution at that point).
>
> So either a short comment "#  consider using 'NO_PERL=YesPlease' for 
> dry
> run invocations" (beware your double negative ;-), or the addition of
> the '+recipe', would still be my preferred change, rather than leaving
> the open manhole for others to fall into.
>
> The thread on my difficulties is at $gmane/263656 (2015-02-10 22:51)
> "
>    At the moment I'm getting (on my old WinXP machine, using Msysgit
>    1.9.5 as a basis)
>
>    $ make -n MSVC=1 V=1 1>makedry.txt
>    make[1]: *** No rule to make target `PM.stamp', needed by 
> `perl.mak'.
>    Stop.
>    make: *** [perl/perl.mak] Error 2
> "
> As you can see, at that time the place to look would be the makefile,
> so I would do think a 'fix' there would still be appropriate.
>
> Do you have a preference among the three options (comment, +recipe, 
> drop)?
> --
> Philip
>

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2015-07-14 22:41 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25  0:03 [PATCH 00/17] Make the msvc-build scripts work again Philip Oakley
2015-06-25  0:03 ` [PATCH 01/17] .gitignore: improve MSVC ignore patterns Philip Oakley
2015-06-25 15:13   ` Junio C Hamano
2015-06-25 19:32     ` Philip Oakley
2015-06-25 20:22       ` Junio C Hamano
2015-06-25  0:03 ` [PATCH 02/17] .gitignore: ignore library directories created by MSVC VS2008 buildsystem Philip Oakley
2015-06-25  0:03 ` [PATCH 03/17] (msvc-build) Vcproj.pm: remove duplicate GUID Philip Oakley
2015-06-28  3:05   ` Eric Sunshine
2015-06-28  8:44     ` Philip Oakley
2015-06-25  0:03 ` [PATCH 04/17] Makefile: a dry-run can error out if no perl. Document the issue Philip Oakley
2015-06-25 15:24   ` Junio C Hamano
2015-06-25 19:33     ` Philip Oakley
2015-06-25 20:21       ` Junio C Hamano
2015-06-25 23:34         ` Philip Oakley
2015-07-14 22:42           ` Philip Oakley
2015-06-25  0:03 ` [PATCH 05/17] engine.pl: fix error message (lib->link) Philip Oakley
2015-06-25  0:03 ` [PATCH 06/17] engine.pl: Avoid complications with perl support Philip Oakley
2015-06-25  0:03 ` [PATCH 07/17] engine.pl: Properly accept quoted spaces in filenames Philip Oakley
2015-06-25  0:03 ` [PATCH 08/17] engine.pl: Fix i18n -o option in msvc buildsystem generator Philip Oakley
2015-06-25  0:03 ` [PATCH 09/17] engine.pl: ignore invalidcontinue.obj which is known to MSVC Philip Oakley
2015-06-25  0:03 ` [PATCH 10/17] engine.pl: name the msvc buildsystem's makedry error file Philip Oakley
2015-06-25  0:03 ` [PATCH 11/17] engine.pl: delete the captured stderr file if empty Philip Oakley
2015-06-25  0:03 ` [PATCH 12/17] engine.pl: add debug line to capture the dry-run Philip Oakley
2015-06-25  0:03 ` [PATCH 13/17] engine.pl: provide more debug print statements Philip Oakley
2015-06-29 21:27   ` Sebastian Schuberth
2015-07-07 22:18     ` Philip Oakley
2015-06-29 21:31   ` Sebastian Schuberth
2015-06-29 21:33   ` Sebastian Schuberth
2015-06-25  0:03 ` [PATCH 14/17] Vcproj.pm: list git.exe first to be startup project Philip Oakley
2015-06-25  0:03 ` [PATCH 15/17] vcbuild/readme: Improve layout and reference msvc-build script Philip Oakley
2015-06-25  0:03 ` [PATCH 16/17] msvc-build: add complete Microsoft Visual C compilation script Philip Oakley
2015-06-25  0:03 ` [PATCH 17/17] config.mak.uname: add MSVC No_SafeExeceptionHandler option Philip Oakley
2015-06-25 15:10 ` [PATCH 00/17] Make the msvc-build scripts work again Junio C Hamano
2015-06-25 19:31   ` Philip Oakley

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).