git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC 3/4] engine.pl: split the .o and .obj processing

From
Philip Oakley <philipoakley@iee.org>
Date
Nov 20, 2014, 23:38 UTC
Message-ID
<1416526682-6024-4-git-send-email-philipoakley@iee.org>
In-Reply-To
<1416526682-6024-1-git-send-email-philipoakley@iee.org>

Commit 4b623d80f7352 added an .obj file (invalidcontinue.obj) which was not processed correctly.

The generate engine then mistakenly did a s/.o/.c/ to create a request to compile invalidcontinue.cbj.

Split the '/\.(o|obj)$' in engine.pl#L353 into:
        } elsif ($part =~ /\.o$/) { # was '/\.(o|obj)$'
            push(@objfiles, $part);
        } elsif ($part =~ /\.obj$/) { # was '/\.(o|obj)$'
            # push(@objfiles, $part); # do nothing
        } else {
And correct the substitution to only operate on .o files.
Also report all errors rather than dieing on the first
 $ git describe 4b623d80f7352
 v1.9.1-1-g4b623d8
The problem exists for V1.9.2 onward
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 contrib/buildsystems/engine.pl | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 8e41808..16c3dd5 100755
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -264,7 +264,9 @@ sub handleCompileLine
         } elsif ($part =~ /\.(c|cc|cpp)$/) {
             $sourcefile = $part;
         } else {
-            die "Unhandled compiler option @ line $lineno: $part";
+            print "full line: $line\n";
+            print "A:-Unhandled compiler option @ line $lineno: $part\n"; # die (if !DEBUG)
+#            die "Unhandled compiler option @ line $lineno: $part";
         }
     }
     @{$compile_options{"${sourcefile}_CFLAGS"}} = @cflags;
@@ -290,14 +292,15 @@ sub handleLibLine
             $libout = $part;
             $libout =~ s/\.a$//;
         } else {
-            die "Unhandled lib option @ line $lineno: $part";
+            print "A:-Unhandled lib option @ line $lineno: $part\n"; # die (if !DEBUG)
+#           die "Unhandled lib option @ line $lineno: $part";
         }
     }
 #    print "LibOut: '$libout'\nLFlags: @lflags\nOfiles: @objfiles\n";
 #    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"}});
@@ -343,8 +346,10 @@ sub handleLinkLine
         } elsif ($part =~ /\.(a|lib)$/) {
             $part =~ s/\.a$/.lib/;
             push(@libs, $part);
-        } elsif ($part =~ /\.(o|obj)$/) {
+        } elsif ($part =~ /\.o$/) { # was '/\.(o|obj)$'
             push(@objfiles, $part);
+        } elsif ($part =~ /\.obj$/) { # was '/\.(o|obj)$'
+            # push(@objfiles, $part); # do nothing
         } else {
             die "Unhandled lib option @ line $lineno: $part";
         }
@@ -353,7 +358,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"}});
-- 
1.9.4.msysgit.0

-- 
-- 
*** 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.
Previous: Junio C HamanoNext: Johannes Schindelin
Message 10 of 19 in “[RFC 0/4] Fix the Visual Studio 2008 .sln generator”
  1. Philip OakleyNov 20, 2014
  2. 1/4 Fix i18n -o option in msvc engine.plPhilip Oakley, Nov 20, 2014
  3. Johannes SchindelinNov 21, 2014
  4. Philip OakleyNov 21, 2014
  5. 2/4 Properly accept quoted space in filenamesPhilip Oakley, Nov 20, 2014
  6. Johannes SchindelinNov 21, 2014
  7. Junio C HamanoNov 21, 2014
  8. Philip OakleyNov 21, 2014
  9. Junio C HamanoNov 21, 2014
  10. 3/4 engine.pl: split the .o and .obj processingPhilip Oakley, Nov 20, 2014
  11. Johannes SchindelinNov 21, 2014
  12. Philip OakleyNov 21, 2014
  13. Johannes SchindelinNov 23, 2014
  14. Philip OakleyNov 23, 2014
  15. 4/4 Improve layout and reference msvc-build scriptPhilip Oakley, Nov 20, 2014
  16. Johannes SchindelinNov 21, 2014
  17. Philip OakleyNov 21, 2014
  18. Johannes SchindelinNov 21, 2014
  19. Philip OakleyNov 21, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.