From: Philip Oakley Date: Fri, 21 Nov 2014 19:57:22 GMT Subject: Re: [RFC 3/4] engine.pl: split the .o and .obj processing Message-ID: <622F65684C63407184D58ED19385AFD4@PhilipOakley> In-Reply-To: From: "Johannes Schindelin" > Hi Philip, > > On Thu, 20 Nov 2014, Philip Oakley wrote: > >> 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. > > This is good. However, this: > >> 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 { > > just repeats what the diff says, so it is unnecessary in the commit > message. OK. > >> 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"; > > This needs to be backed out. I agree that it is nice to get going and > to > debug, so I would split it out into its own commit while working on > the > branch, but then drop it before submitting. I'll probably split this "improvement in error reporting" (by providing the full offending line) into a separate patch, on the basis that we want (Windows) folks to start helping, so let's make the error messages more useful to those who don't know these scripting languages yet. > >> @@ -290,14 +292,15 @@ sub handleLibLine >>[...] >> foreach (@objfiles) { >> my $sourcefile = $_; >> - $sourcefile =~ s/\.o/.c/; >> + $sourcefile =~ s/\.o$/.c/; > > Ah, I see from the context that my earlier comment about the > white-space > delimiter was wrong: at this stage, we already have split the list. So > this is groovy. > >> @@ -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 > > How about the following instead? > > + } elsif ($part eq 'invalidcontinue.obj') { > + # ignore > } elsif ($part =~ /\.(o|obj)$/) { Looks good, I'll use that (after deciding whether .obj files should be expected in a 'make' output anyway) > > ? After all, this change is really only about handling the newly > introduced invalidcontinue.obj correctly. Did it ever handle .obj's correctly (rhet) - I dunno. > > Ciao, > Johannes > -- > 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 > -- -- *** 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.