Package: qtwebkit-opensource-src / 5.212.0~alpha4-30

bison_3.7.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: let Bison generate the header directly
 Starting with Bison 3.7, the generated C   file #include's the header
 by default, instead of duplicating it. So we should not delete it.
 .
 Remove the code to add #ifdef guards to the header, since Bison adds
 them itself since version 2.6.3.
Author: Dmitry Shachnev <[email protected]>
Forwarded: https://github.com/qtwebkit/qtwebkit/pull/1012
Last-Update: 2020-08-04

--- a/Source/WebCore/css/makegrammar.pl
    b/Source/WebCore/css/makegrammar.pl
@@ -73,25  73,6 @@ if ($suffix eq ".y.in") {
 }
 
 my $fileBase = File::Spec->join($outputDir, $filename);
-my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
 my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp");
 push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives.
 system(@bisonCommand) == 0 or die;
-
-open HEADER, ">$fileBase.h" or die;
-print HEADER << "EOF";
-#ifndef CSSGRAMMAR_H
-#define CSSGRAMMAR_H
-EOF
-
-open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;
-while (<HPP>) {
-    print HEADER;
-}
-close HPP;
-
-print HEADER "#endif\n";
-close HEADER;
-
-unlink("$fileBase.cpp.h");
-unlink("$fileBase.hpp");
-