Skip to content

Commit 3b98f86

Browse files
author
Git for Windows Build Agent
committed
Merge pull request #552 from duncansmart/fix-vcproj-gen
Fix Visual Studio .sln/.vcproj generation.
2 parents 71afe90 + 92ad3a8 commit 3b98f86

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

contrib/buildsystems/engine.pl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ sub handleLibLine
282282
# exit(1);
283283
foreach (@objfiles) {
284284
my $sourcefile = $_;
285-
$sourcefile =~ s/\.o/.c/;
285+
$sourcefile =~ s/\.o$/.c/;
286286
push(@sources, $sourcefile);
287287
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
288288
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});
@@ -326,8 +326,12 @@ sub handleLinkLine
326326
} elsif ($part =~ /\.(a|lib)$/) {
327327
$part =~ s/\.a$/.lib/;
328328
push(@libs, $part);
329-
} elsif ($part =~ /\.(o|obj)$/) {
329+
} elsif ($part eq 'invalidcontinue.obj') {
330+
# ignore - known to MSVC
331+
} elsif ($part =~ /\.o$/) {
330332
push(@objfiles, $part);
333+
} elsif ($part =~ /\.obj$/) {
334+
# do nothing, 'make' should not be producing .obj, only .o files
331335
} else {
332336
die "Unhandled lib option @ line $lineno: $part";
333337
}
@@ -336,7 +340,7 @@ sub handleLinkLine
336340
# exit(1);
337341
foreach (@objfiles) {
338342
my $sourcefile = $_;
339-
$sourcefile =~ s/\.o/.c/;
343+
$sourcefile =~ s/\.o$/.c/;
340344
push(@sources, $sourcefile);
341345
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
342346
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});

0 commit comments

Comments
 (0)