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

[PATCH 3/5] engine.pl: ignore invalidcontinue.obj which is known to MSVC

From
Philip Oakley <philipoakley@iee.org>
Date
Dec 24, 2014, 10:47 UTC
Message-ID
<1419418034-6276-4-git-send-email-philipoakley@iee.org>
In-Reply-To
<1419418034-6276-1-git-send-email-philipoakley@iee.org>

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 7f45b80..e913280 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 lib 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.1.0
Previous: Philip OakleyNext: Philip Oakley
Message 5 of 8 in “Fix the Visual Studio 2008 .sln generator”
  1. 0/5 Fix the Visual Studio 2008 .sln generatorPhilip Oakley, Dec 24, 2014
  2. 1/5 engine.pl: Fix i18n -o option in msvc buildsystem generatorPhilip Oakley, Dec 24, 2014
  3. Philip OakleyDec 26, 2014
  4. 2/5 engine.pl: Properly accept quoted spaces in filenamesPhilip Oakley, Dec 24, 2014
  5. 3/5 engine.pl: ignore invalidcontinue.obj which is known to MSVCPhilip Oakley, Dec 24, 2014
  6. 4/5 vcbuild/readme: Improve layout and reference msvc-build scriptPhilip Oakley, Dec 24, 2014
  7. 5/5 engine.pl: provide more debug print statementsPhilip Oakley, Dec 24, 2014
  8. Philip OakleyDec 26, 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.