@@ -282,7 +282,7 @@ sub handleLibLine
282
282
# exit(1);
283
283
foreach (@objfiles ) {
284
284
my $sourcefile = $_ ;
285
- $sourcefile =~ s /\. o/ .c/ ;
285
+ $sourcefile =~ s /\. o$ / .c/ ;
286
286
push (@sources , $sourcefile );
287
287
push (@cflags , @{$compile_options {" ${sourcefile} _CFLAGS" }});
288
288
push (@defines , @{$compile_options {" ${sourcefile} _DEFINES" }});
@@ -326,8 +326,12 @@ sub handleLinkLine
326
326
} elsif ($part =~ / \. (a|lib)$ / ) {
327
327
$part =~ s /\. a$/ .lib/ ;
328
328
push (@libs , $part );
329
- } elsif ($part =~ / \. (o|obj)$ / ) {
329
+ } elsif ($part eq ' invalidcontinue.obj' ) {
330
+ # ignore - known to MSVC
331
+ } elsif ($part =~ / \. o$ / ) {
330
332
push (@objfiles , $part );
333
+ } elsif ($part =~ / \. obj$ / ) {
334
+ # do nothing, 'make' should not be producing .obj, only .o files
331
335
} else {
332
336
die " Unhandled lib option @ line $lineno : $part " ;
333
337
}
@@ -336,7 +340,7 @@ sub handleLinkLine
336
340
# exit(1);
337
341
foreach (@objfiles ) {
338
342
my $sourcefile = $_ ;
339
- $sourcefile =~ s /\. o/ .c/ ;
343
+ $sourcefile =~ s /\. o$ / .c/ ;
340
344
push (@sources , $sourcefile );
341
345
push (@cflags , @{$compile_options {" ${sourcefile} _CFLAGS" }});
342
346
push (@defines , @{$compile_options {" ${sourcefile} _DEFINES" }});
0 commit comments