Summary: | Disable #line markers in bison output on Windows | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Konstantin Tokarev <annulen> | ||||
Component: | WebCore Misc. | Assignee: | Konstantin Tokarev <annulen> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, bfulgham, darin, pvollan | ||||
Priority: | P2 | ||||||
Version: | WebKit Local Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Konstantin Tokarev
2016-11-18 17:20:25 PST
Created attachment 295229 [details]
Patch
Comment on attachment 295229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295229&action=review > Source/WebCore/css/makegrammar.pl:83 > -system("\"$bison\" -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp"); > + > +my $extraArg = ""; > +if ($^O eq "MSWin32") { > + $extraArg = "--no-lines"; > +} > +system("\"$bison\" $extraArg -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp"); Here's how I would write it: my @noLines = (); push @noLines, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. system($bison, @noLines, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp") == 0 or die; What about my @bisonCmd = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", $fileBase.cpp); push @bisonCmd, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. system(@bisonCmd) == 0 or die; ? That seems fine. I would name it @bisonCommand, without abbreviating the word, though. (In reply to comment #3) > my @bisonCmd = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, > "-o", $fileBase.cpp); Need quotes around "$fileBase.cpp". Committed r208954: <http://trac.webkit.org/changeset/208954> |