2006-12-14 Simon Hausmann <hausmann@kde.org>
authorhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Dec 2006 16:47:26 +0000 (16:47 +0000)
committerhausmann <hausmann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Dec 2006 16:47:26 +0000 (16:47 +0000)
        Reviewed by Zack Rusin.

        * WebCore.pro: Clean up the xpath grammar generation rule.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.pro

index 7233a4ec0680446dcdf4468ab92b9dc6c6dd62ae..2bd79ec83d9173c74dfe96ee53a51acfbba0b9de 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-14  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Zack Rusin.
+
+        * WebCore.pro: Clean up the xpath grammar generation rule.
+
 2006-12-14  Zack Rusin  <zack@kde.org>
 
         Make it link with temporary stubs.
index da80e4ac7e6d022601a95cbc1b561e455f6f564d..fa5958e7ef2a8aaa103f442ee5925fd260326663 100644 (file)
@@ -671,21 +671,13 @@ SOURCES += \
 contains(DEFINES, XPATH_SUPPORT=1) {
     FEATURE_DEFINES_JAVASCRIPT += XPATH_SUPPORT
 
-    # TODO: convert to generator
-    !exists(xml/XPathGrammar.cpp) {
-        message("generating xpath grammar")
-        !system( bison -d -p xpathyy xml/XPathGrammar.y -o XPathGrammar.tab.c ): error("error executing bison")
-        !system( mv XPathGrammar.tab.c xml/XPathGrammar.cpp ): error("error renaming XPathGrammar.cpp")
-        !system( mv XPathGrammar.tab.h xml/XPathGrammar.h ): error("error renaming XPathGrammar.h")
-    }
+    XPATHBISON = $$PWD/xml/XPathGrammar.y
 
     IDL_BINDINGS += \
         xml/XPathNSResolver.idl \
         xml/XPathExpression.idl \
         xml/XPathResult.idl \
         xml/XPathEvaluator.idl
-
-    SOURCES += xml/XPathGrammar.cpp
 }
 
 contains(DEFINES, XSLT_SUPPORT=1) {
@@ -1153,3 +1145,15 @@ manual_moc.commands = $$QMAKE_MOC ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
 manual_moc.input = MANUALMOC
 manual_moc.CONFIG += target_predeps no_link
 QMAKE_EXTRA_COMPILERS += manual_moc
+
+# GENERATOR 10: XPATH grammar
+xpathbison.output = tmp/${QMAKE_FILE_BASE}.cpp
+xpathbison.commands = bison -d -p xpathyy ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_BASE}.tab.c && mv ${QMAKE_FILE_BASE}.tab.c tmp/${QMAKE_FILE_BASE}.cpp && mv ${QMAKE_FILE_BASE}.tab.h tmp/${QMAKE_FILE_BASE}.h
+xpathbison.depend = ${QMAKE_FILE_NAME}
+xpathbison.input = XPATHBISON
+xpathbison.CONFIG = target_predeps
+xpathbison.dependency_type = TYPE_C
+xpathbison.variable_out = GENERATED_SOURCES
+QMAKE_EXTRA_COMPILERS += xpathbison
+
+