Title: [122947] trunk
Revision
122947
Author
[email protected]
Date
2012-07-18 04:41:33 -0700 (Wed, 18 Jul 2012)

Log Message

[ANGLE] On QT, use Bison and Flex during ANGLE build
https://bugs.webkit.org/show_bug.cgi?id=91108

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add derived source generators for the two angle bison parsers and flex based lexers.

* DerivedSources.pri:
* Target.pri:

Tools:

* qmake/mkspecs/features/default_post.prf: Add support for variable_out to our generators, to allow
generating not only for SOURCES but also ANGLE_SOURCES (in this bug)

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122946 => 122947)


--- trunk/Source/WebCore/ChangeLog	2012-07-18 11:30:37 UTC (rev 122946)
+++ trunk/Source/WebCore/ChangeLog	2012-07-18 11:41:33 UTC (rev 122947)
@@ -1,3 +1,15 @@
+2012-07-18  Simon Hausmann  <[email protected]>
+
+        [ANGLE] On QT, use Bison and Flex during ANGLE build
+        https://bugs.webkit.org/show_bug.cgi?id=91108
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add derived source generators for the two angle bison parsers and flex based lexers.
+
+        * DerivedSources.pri:
+        * Target.pri:
+
 2012-07-18  Dominik Röttsches  <[email protected]>
 
         [EFL][WK2] Too early assertion failure if default theme is not available

Modified: trunk/Source/WebCore/DerivedSources.pri (122946 => 122947)


--- trunk/Source/WebCore/DerivedSources.pri	2012-07-18 11:30:37 UTC (rev 122946)
+++ trunk/Source/WebCore/DerivedSources.pri	2012-07-18 11:41:33 UTC (rev 122947)
@@ -901,3 +901,36 @@
 webkitversion.clean = ${QMAKE_FUNC_FILE_OUT_PATH}/WebKitVersion.h
 webkitversion.add_output_to_sources = false
 GENERATORS += webkitversion
+
+# Generator 12: Angle parsers
+contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
+
+    ANGLE_DIR = $$replace(PWD, "WebCore", "ThirdParty/ANGLE")
+
+    ANGLE_FLEX_SOURCES = \
+        $$ANGLE_DIR/src/compiler/glslang.l \
+        $$ANGLE_DIR/src/compiler/preprocessor/new/Tokenizer.l
+
+    angleflex.output = ${QMAKE_FILE_BASE}_lex.cpp
+    angleflex.input = ANGLE_FLEX_SOURCES
+    angleflex.commands = flex --noline --nounistd --outfile=${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+    *g++*: angleflex.variable_out = ANGLE_SOURCES
+    GENERATORS += angleflex
+
+    ANGLE_BISON_SOURCES = \
+        $$ANGLE_DIR/src/compiler/glslang.y \
+        $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.y
+
+    anglebison_decl.output = ${QMAKE_FILE_BASE}_tab.h
+    anglebison_decl.input = ANGLE_BISON_SOURCES
+    anglebison_decl.commands = bison --no-lines --skeleton=yacc.c --defines=${QMAKE_FILE_OUT} --output=${QMAKE_FUNC_FILE_OUT_PATH}$${QMAKE_DIR_SEP}${QMAKE_FILE_OUT_BASE}.cpp ${QMAKE_FILE_IN}
+    anglebison_decl.variable_out = GENERATED_FILES
+    GENERATORS += anglebison_decl
+
+    anglebison_impl.input = ANGLE_BISON_SOURCES
+    anglebison_impl.commands = $$escape_expand(\\n)
+    anglebison_impl.depends = ${QMAKE_FILE_BASE}_tab.h
+    anglebison_impl.output = ${QMAKE_FILE_BASE}_tab.cpp
+    *g++*: anglebison_impl.variable_out = ANGLE_SOURCES
+    GENERATORS += anglebison_impl
+}

Modified: trunk/Source/WebCore/Target.pri (122946 => 122947)


--- trunk/Source/WebCore/Target.pri	2012-07-18 11:30:37 UTC (rev 122946)
+++ trunk/Source/WebCore/Target.pri	2012-07-18 11:41:33 UTC (rev 122947)
@@ -3716,7 +3716,10 @@
 
     ANGLE_DIR = $$replace(PWD, "WebCore", "ThirdParty/ANGLE")
 
-    INCLUDEPATH += $$ANGLE_DIR/src $$ANGLE_DIR/include
+    INCLUDEPATH += \
+        $$ANGLE_DIR/src \
+        $$ANGLE_DIR/src/compiler/preprocessor/new \
+        $$ANGLE_DIR/include
 
     ANGLE_HEADERS += \
         $$ANGLE_DIR/src/compiler/BaseTypes.h \
@@ -3734,7 +3737,6 @@
         $$ANGLE_DIR/src/compiler/ExtensionBehavior.h \
         $$ANGLE_DIR/src/compiler/ForLoopUnroll.h \
         $$ANGLE_DIR/src/compiler/glslang.h \
-        $$ANGLE_DIR/src/compiler/glslang_tab.h \
         $$ANGLE_DIR/src/compiler/InfoSink.h \
         $$ANGLE_DIR/src/compiler/InitializeDll.h \
         $$ANGLE_DIR/src/compiler/InitializeGlobals.h \
@@ -3754,7 +3756,6 @@
         $$ANGLE_DIR/src/compiler/preprocessor/new/Diagnostics.h \
         $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveHandler.h \
         $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveParser.h \
-        $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.h \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Input.h \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Lexer.h \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Macro.h \
@@ -3809,8 +3810,6 @@
         $$ANGLE_DIR/src/compiler/Diagnostics.cpp \
         $$ANGLE_DIR/src/compiler/DirectiveHandler.cpp \
         $$ANGLE_DIR/src/compiler/ForLoopUnroll.cpp \
-        $$ANGLE_DIR/src/compiler/glslang_lex.cpp \
-        $$ANGLE_DIR/src/compiler/glslang_tab.cpp \
         $$ANGLE_DIR/src/compiler/InfoSink.cpp \
         $$ANGLE_DIR/src/compiler/Initialize.cpp \
         $$ANGLE_DIR/src/compiler/InitializeDll.cpp \
@@ -3851,14 +3850,12 @@
         $$ANGLE_DIR/src/compiler/preprocessor/new/DiagnosticsBase.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveHandlerBase.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/DirectiveParser.cpp \
-        $$ANGLE_DIR/src/compiler/preprocessor/new/ExpressionParser.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Input.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Lexer.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Macro.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/MacroExpander.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Preprocessor.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/new/Token.cpp \
-        $$ANGLE_DIR/src/compiler/preprocessor/new/Tokenizer.cpp \
         $$ANGLE_DIR/src/compiler/preprocessor/scanner.c \
         $$ANGLE_DIR/src/compiler/preprocessor/symbols.c \
         $$ANGLE_DIR/src/compiler/preprocessor/tokens.c

Modified: trunk/Tools/ChangeLog (122946 => 122947)


--- trunk/Tools/ChangeLog	2012-07-18 11:30:37 UTC (rev 122946)
+++ trunk/Tools/ChangeLog	2012-07-18 11:41:33 UTC (rev 122947)
@@ -1,3 +1,13 @@
+2012-07-18  Simon Hausmann  <[email protected]>
+
+        [ANGLE] On QT, use Bison and Flex during ANGLE build
+        https://bugs.webkit.org/show_bug.cgi?id=91108
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * qmake/mkspecs/features/default_post.prf: Add support for variable_out to our generators, to allow
+        generating not only for SOURCES but also ANGLE_SOURCES (in this bug)
+
 2012-07-18  Balazs Kelemen  <[email protected]>
 
         [Qt] plugin tests should not be disabled for WebKit1

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (122946 => 122947)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-07-18 11:30:37 UTC (rev 122946)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-07-18 11:41:33 UTC (rev 122947)
@@ -95,6 +95,8 @@
         output = $$eval($${generator}.output)
         input = $$eval($${generator}.input)
         input_files = $$eval($$input)
+        output_variable = $$eval($${generator}.variable_out)
+        isEmpty(output_variable): output_variable = SOURCES
 
         isEmpty($${generator}.output_function) {
             prependEach(output, $${GENERATED_SOURCES_DESTDIR}/)
@@ -104,13 +106,13 @@
                 base ~= s/\\..+//
                 output_file = $$replace(output,\\$\\{QMAKE_FILE_BASE\\}, $$base)
 
-                SOURCES += $$output_file
+                eval($$output_variable += $$output_file)
             }
         } else {
             function = $$eval($${generator}.output_function)
             for(input_file, input_files) {
                 eval(output_file = \$\$$$function\($$input_file\))
-                SOURCES += $$output_file
+                eval($$output_variable += $$output_file)
             }
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to