[Qt] Split the build process in two different .pro files.
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jan 2010 16:06:39 +0000 (16:06 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jan 2010 16:06:39 +0000 (16:06 +0000)
This allows qmake to be run once all source files are available.

Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2010-01-13
Reviewed by Simon Hausmann.

.:

* DerivedSources.pro: Added.
* WebKit.pri:

JavaScriptCore:

* DerivedSources.pro: Added.
* JavaScriptCore.pri: Moved source generation to DerivedSources.pro
* pcre/pcre.pri: Moved source generation to DerivedSources.pro

WebCore:

* DerivedSources.pro: Added.
* WebCore.pri: Added. Contains common logic between source generation and compilation.
* WebCore.pro: Moved source generation to DerivedSources.pro.

WebKitTools:

* Scripts/webkitdirs.pm: Add calls to make DerivedSources.pro in JSC and WC.

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

13 files changed:
ChangeLog
DerivedSources.pro [new file with mode: 0644]
JavaScriptCore/ChangeLog
JavaScriptCore/DerivedSources.pro [new file with mode: 0644]
JavaScriptCore/JavaScriptCore.pri
JavaScriptCore/pcre/pcre.pri
WebCore/ChangeLog
WebCore/DerivedSources.pro [new file with mode: 0644]
WebCore/WebCore.pri [new file with mode: 0644]
WebCore/WebCore.pro
WebKit.pri
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitdirs.pm

index 39196e0c85be2e90270c5bcbbf5ac670056cec64..5dd495f46b1cee103ade20f9864b8efc7c332e68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Split the build process in two different .pro files.
+        This allows qmake to be run once all source files are available.
+
+        * DerivedSources.pro: Added.
+        * WebKit.pri:
+
 2010-01-07  Daniel Bates  <dbates@rim.com>
 
         Reviewed by Eric Seidel.
diff --git a/DerivedSources.pro b/DerivedSources.pro
new file mode 100644 (file)
index 0000000..c450b28
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+
+SUBDIRS += \
+        JavaScriptCore/DerivedSources.pro \
+        WebCore/DerivedSources.pro
+
index 9902a971d3488dcf8c7eb8264b6754c340a555c7..6f5eda58e873529d31660cd3f532b3d7445e8d65 100644 (file)
@@ -1,3 +1,14 @@
+2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Split the build process in two different .pro files.
+        This allows qmake to be run once all source files are available.
+
+        * DerivedSources.pro: Added.
+        * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
+        * pcre/pcre.pri: Moved source generation to DerivedSources.pro
+
 2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
 
         Reviewed by Geoffrey Garen.
diff --git a/JavaScriptCore/DerivedSources.pro b/JavaScriptCore/DerivedSources.pro
new file mode 100644 (file)
index 0000000..a32913a
--- /dev/null
@@ -0,0 +1,86 @@
+# DerivedSources - qmake build info
+
+TEMPLATE = lib
+TARGET = dummy
+
+QMAKE_EXTRA_TARGETS += generated_files
+
+CONFIG(standalone_package) {
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
+}
+
+LUT_FILES += \
+    runtime/ArrayPrototype.cpp \
+    runtime/DatePrototype.cpp \
+    runtime/JSONObject.cpp \
+    runtime/MathObject.cpp \
+    runtime/NumberConstructor.cpp \
+    runtime/RegExpConstructor.cpp \
+    runtime/RegExpObject.cpp \
+    runtime/StringPrototype.cpp
+
+KEYWORDLUT_FILES += \
+    parser/Keywords.table
+
+JSCBISON += \
+    parser/Grammar.y
+
+RVCT_STUB_FILES += \
+    jit/JITStubs.cpp
+
+defineTest(addExtraCompiler) {
+    eval($${1}.CONFIG = target_predeps no_link)
+    eval($${1}.variable_out =)
+    eval($${1}.dependency_type = TYPE_C)
+
+    export($${1}.CONFIG)
+    export($${1}.variable_out)
+    export($${1}.dependency_type)
+
+    QMAKE_EXTRA_COMPILERS += $$1
+    generated_files.depends += compiler_$${1}_make_all
+    export(QMAKE_EXTRA_COMPILERS)
+    export(generated_files.depends)
+    return(true)
+}
+
+# GENERATOR 1-A: LUT creator
+lut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
+lut.input = LUT_FILES
+lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+lut.depend = ${QMAKE_FILE_NAME}
+addExtraCompiler(lut)
+
+# GENERATOR 1-B: particular LUT creator (for 1 file only)
+keywordlut.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
+keywordlut.input = KEYWORDLUT_FILES
+keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+keywordlut.depend = ${QMAKE_FILE_NAME}
+addExtraCompiler(keywordlut)
+
+# GENERATOR 2: bison grammar
+jscbison.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
+jscbison.input = JSCBISON
+jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
+jscbison.depend = ${QMAKE_FILE_NAME}
+addExtraCompiler(jscbison)
+
+# GENERATOR 3: JIT Stub functions for RVCT
+rvctstubs.output = $${JSC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
+rvctstubs.commands = perl $$PWD/create_rvct_stubs ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
+rvctstubs.depend = ${QMAKE_FILE_NAME}
+rvctstubs.input = RVCT_STUB_FILES
+rvctstubs.CONFIG += no_link
+addExtraCompiler(rvctstubs)
+
+# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
+win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
+DFTABLES = $$PWD/pcre/dftables
+ctgen.output = $$JSC_GENERATED_SOURCES_DIR/chartables.c
+ctgen.input = DFTABLES
+ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT} $$PREPROCESSOR
+ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_JSC_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}
+addExtraCompiler(ctgen)
+
index bb9cffeb3cb03312ce9191f3a9e29ddb3dc2fa96..75737aed66fe43ac0e1d63947b85e129523cbeb2 100644 (file)
@@ -1,11 +1,15 @@
 # JavaScriptCore - Qt4 build info
 VPATH += $$PWD
 
+CONFIG(standalone_package) {
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
+}
+
 CONFIG(debug, debug|release) {
-    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
     OBJECTS_DIR = obj/debug
 } else { # Release
-    isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
     OBJECTS_DIR = obj/release
 }
 
@@ -24,6 +28,7 @@ INCLUDEPATH = \
     $$PWD/interpreter \
     $$PWD/jit \
     $$PWD/parser \
+    $$PWD/pcre \
     $$PWD/profiler \
     $$PWD/runtime \
     $$PWD/wrec \
@@ -32,12 +37,11 @@ INCLUDEPATH = \
     $$PWD/yarr \
     $$PWD/API \
     $$PWD/ForwardingHeaders \
-    $$GENERATED_SOURCES_DIR \
+    $$JSC_GENERATED_SOURCES_DIR \
     $$INCLUDEPATH
 
 DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
 
-GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
 win32-* {
     LIBS += -lwinmm
 }
@@ -68,25 +72,6 @@ wince* {
 
 include(pcre/pcre.pri)
 
-LUT_FILES += \
-    runtime/ArrayPrototype.cpp \
-    runtime/DatePrototype.cpp \
-    runtime/JSONObject.cpp \
-    runtime/MathObject.cpp \
-    runtime/NumberConstructor.cpp \
-    runtime/RegExpConstructor.cpp \
-    runtime/RegExpObject.cpp \
-    runtime/StringPrototype.cpp
-
-KEYWORDLUT_FILES += \
-    parser/Keywords.table
-
-JSCBISON += \
-    parser/Grammar.y
-
-RVCT_STUB_FILES += \
-    jit/JITStubs.cpp
-
 SOURCES += \
     API/JSBase.cpp \
     API/JSCallbackConstructor.cpp \
@@ -236,40 +221,11 @@ SOURCES += \
     yarr/RegexInterpreter.cpp \
     yarr/RegexJIT.cpp
 
+# Generated files, simply list them for JavaScriptCore
+SOURCES += \
+    $${JSC_GENERATED_SOURCES_DIR}/Grammar.cpp
+
 !contains(DEFINES, USE_SYSTEM_MALLOC) {
     SOURCES += wtf/TCSystemAlloc.cpp
 }
 
-# GENERATOR 1-A: LUT creator
-lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h
-lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
-lut.depend = ${QMAKE_FILE_NAME}
-lut.input = LUT_FILES
-lut.CONFIG += no_link
-addExtraCompiler(lut)
-
-# GENERATOR 1-B: particular LUT creator (for 1 file only)
-keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h
-keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
-keywordlut.depend = ${QMAKE_FILE_NAME}
-keywordlut.input = KEYWORDLUT_FILES
-keywordlut.CONFIG += no_link
-addExtraCompiler(keywordlut)
-
-# GENERATOR 2: bison grammar
-jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
-jscbison.depend = ${QMAKE_FILE_NAME}
-jscbison.input = JSCBISON
-jscbison.variable_out = GENERATED_SOURCES
-jscbison.dependency_type = TYPE_C
-jscbison.CONFIG = target_predeps
-addExtraCompilerWithHeader(jscbison)
-
-# GENERATOR 3: JIT Stub functions for RVCT
-rvctstubs.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Generated${QMAKE_FILE_BASE}_RVCT.h
-rvctstubs.commands = perl $$PWD/create_rvct_stubs ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
-rvctstubs.depend = ${QMAKE_FILE_NAME}
-rvctstubs.input = RVCT_STUB_FILES
-rvctstubs.CONFIG += no_link
-addExtraCompiler(rvctstubs)
index 093e0e69cc53ed4e2ee2f6a202c0149c496f39e1..4f59e17f4d917660328a8c50bd5d08325970cf47 100644 (file)
@@ -3,8 +3,6 @@ VPATH += $$PWD
 INCLUDEPATH += $$PWD $$OUTPUT_DIR/JavaScriptCore/tmp
 DEPENDPATH += $$PWD
 
-isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
-
 SOURCES += \
     pcre_compile.cpp \
     pcre_exec.cpp \
@@ -12,24 +10,3 @@ SOURCES += \
     pcre_ucp_searchfuncs.cpp \
     pcre_xclass.cpp
 
-!CONFIG(standalone_package) {
-    defineTest(addExtraCompiler) {
-        QMAKE_EXTRA_COMPILERS += $$1
-        generated_files.depends += compiler_$${1}_make_all
-        export(QMAKE_EXTRA_COMPILERS)
-        export(generated_files.depends)
-        return(true)
-    }
-}
-
-# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
-win32-msvc*|wince*: PREPROCESSOR = "--preprocessor=\"$$QMAKE_CC /E\""
-DFTABLES = $$PWD/dftables
-ctgen.input = DFTABLES
-ctgen.output = $$GENERATED_SOURCES_DIR/chartables.c
-ctgen.commands = perl $$DFTABLES ${QMAKE_FILE_OUT} $$PREPROCESSOR
-ctgen.CONFIG += target_predeps no_link
-ctgen.variable_out = GENERATED_SOURCES
-ctgen.dependency_type = TYPE_C
-ctgen.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}
-addExtraCompiler(ctgen)
index bade55ac21b4b24337a301e869bc9d7be469ec6e..003da51b6b6a19c92744146287c6bc6d1e4d625b 100644 (file)
@@ -1,3 +1,14 @@
+2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Split the build process in two different .pro files.
+        This allows qmake to be run once all source files are available.
+
+        * DerivedSources.pro: Added.
+        * WebCore.pri: Added. Contains common logic between source generation and compilation.
+        * WebCore.pro: Moved source generation to DerivedSources.pro.
+
 2010-01-13  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/DerivedSources.pro b/WebCore/DerivedSources.pro
new file mode 100644 (file)
index 0000000..c106d5b
--- /dev/null
@@ -0,0 +1,25 @@
+# DerivedSources - qmake build info
+
+TEMPLATE = lib
+TARGET = dummy
+
+QMAKE_EXTRA_TARGETS += generated_files
+
+defineTest(addExtraCompiler) {
+    eval($${1}.CONFIG = target_predeps no_link)
+    eval($${1}.variable_out =)
+    eval($${1}.dependency_type = TYPE_C)
+
+    export($${1}.CONFIG)
+    export($${1}.variable_out)
+    export($${1}.dependency_type)
+
+    QMAKE_EXTRA_COMPILERS += $$1
+    generated_files.depends += compiler_$${1}_make_all
+    export(QMAKE_EXTRA_COMPILERS)
+    export(generated_files.depends)
+    return(true)
+}
+
+include(WebCore.pri)
+
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
new file mode 100644 (file)
index 0000000..4a59b09
--- /dev/null
@@ -0,0 +1,671 @@
+CONFIG(standalone_package) {
+    isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/generated
+} else {
+    isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = generated
+}
+
+## Define default features macros for optional components
+## (look for defs in config.h and included files!)
+# Try to locate sqlite3 source
+CONFIG(QTDIR_build) {
+    SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/
+} else {
+    SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
+    isEmpty(SQLITE3SRCDIR) {
+        SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
+    }
+}
+
+contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
+    DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
+}
+
+# turn off SQLITE support if we do not have sqlite3 available
+!CONFIG(QTDIR_build):win32-*:!exists( $${SQLITE3SRCDIR}/sqlite3.c ): DEFINES += ENABLE_SQLITE=0 ENABLE_DATABASE=0 ENABLE_ICONDATABASE=0 ENABLE_OFFLINE_WEB_APPLICATIONS=0 ENABLE_DOM_STORAGE=0
+
+!contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
+!contains(DEFINES, ENABLE_DATABASE=.): DEFINES += ENABLE_DATABASE=1
+!contains(DEFINES, ENABLE_EVENTSOURCE=.): DEFINES += ENABLE_EVENTSOURCE=1
+!contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=.): DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
+!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
+!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
+!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
+!contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=0
+
+# turn on SQLITE support if any of the dependent features are turned on
+!contains(DEFINES, ENABLE_SQLITE=.) {
+  contains(DEFINES, ENABLE_DATABASE=1)|contains(DEFINES, ENABLE_ICONDATABASE=1)|contains(DEFINES, ENABLE_DOM_STORAGE=1)|contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
+    DEFINES += ENABLE_SQLITE=1
+  } else {
+    DEFINES += ENABLE_SQLITE=0
+  }
+}
+
+!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
+!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
+!contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
+#!contains(DEFINES, ENABLE_XBL=.): DEFINES += ENABLE_XBL=1
+!contains(DEFINES, ENABLE_WCSS=.): DEFINES += ENABLE_WCSS=0
+!contains(DEFINES, ENABLE_WML=.): DEFINES += ENABLE_WML=0
+!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
+!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
+!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
+!contains(DEFINES, ENABLE_DATAGRID=.): DEFINES += ENABLE_DATAGRID=0
+!contains(DEFINES, ENABLE_VIDEO=.): DEFINES += ENABLE_VIDEO=1
+
+# SVG support
+!contains(DEFINES, ENABLE_SVG=0) {
+    !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
+    !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
+    !contains(DEFINES, ENABLE_SVG_FOREIGN_OBJECT=.): DEFINES += ENABLE_SVG_FOREIGN_OBJECT=1
+    !contains(DEFINES, ENABLE_SVG_ANIMATION=.): DEFINES += ENABLE_SVG_ANIMATION=1
+    !contains(DEFINES, ENABLE_SVG_AS_IMAGE=.): DEFINES += ENABLE_SVG_AS_IMAGE=1
+    !contains(DEFINES, ENABLE_SVG_USE=.): DEFINES += ENABLE_SVG_USE=1
+} else {
+    DEFINES += ENABLE_SVG_FONTS=0 ENABLE_SVG_FOREIGN_OBJECT=0 ENABLE_SVG_ANIMATION=0 ENABLE_SVG_AS_IMAGE=0 ENABLE_SVG_USE=0
+}
+
+# HTML5 media support
+!contains(DEFINES, ENABLE_VIDEO=.): DEFINES += ENABLE_VIDEO=1
+
+# HTML5 datalist support
+!contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
+
+# Nescape plugins support (NPAPI)
+!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
+    unix|win32-*:!embedded:!wince*: {
+        DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
+    } else {
+        DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
+    }
+}
+
+# Web Socket support.
+!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+
+# XSLT support with QtXmlPatterns
+!contains(DEFINES, ENABLE_XSLT=.) {
+    contains(QT_CONFIG, xmlpatterns):!lessThan(QT_MINOR_VERSION, 5):DEFINES += ENABLE_XSLT=1
+    else:DEFINES += ENABLE_XSLT=0
+}
+
+!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
+    symbian: {
+        exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \
+        exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) {
+            DEFINES += ENABLE_QT_BEARER=1
+        }
+    }
+}
+
+DEFINES += WTF_CHANGES=1
+
+# Enable touch event support with Qt 4.6
+!lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1
+
+# Used to compute defaults for the build-webkit script
+CONFIG(compute_defaults) {
+    message($$DEFINES)
+    error("Done computing defaults")
+}
+
+contains(DEFINES, ENABLE_WCSS=1) {
+    contains(DEFINES, ENABLE_XHTMLMP=0) {
+        DEFINES -= ENABLE_XHTMLMP=0
+        DEFINES += ENABLE_XHTMLMP=1
+    }
+}
+
+## Forward enabled feature macros to JavaScript enabled features macros
+FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
+contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
+contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
+contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0): DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
+contains(DEFINES, ENABLE_DATAGRID=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1
+contains(DEFINES, ENABLE_EVENTSOURCE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_EVENTSOURCE=1
+contains(DEFINES, ENABLE_DATABASE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATABASE=1
+contains(DEFINES, ENABLE_DOM_STORAGE=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1
+contains(DEFINES, ENABLE_SHARED_SCRIPT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_SCRIPT=1
+contains(DEFINES, ENABLE_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
+contains(DEFINES, ENABLE_SHARED_WORKERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
+contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
+contains(DEFINES, ENABLE_XPATH=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
+contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
+contains(DEFINES, ENABLE_XBL=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XBL=1
+contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
+contains(DEFINES, ENABLE_WCSS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
+contains(DEFINES, ENABLE_WML=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
+contains(DEFINES, ENABLE_XHTMLMP=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
+contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
+contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
+contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
+contains(DEFINES, ENABLE_WEB_SOCKETS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
+
+
+## Derived source generators
+WML_NAMES = $$PWD/wml/WMLTagNames.in
+
+SVG_NAMES = $$PWD/svg/svgtags.in
+
+XLINK_NAMES = $$PWD/svg/xlinkattrs.in
+
+TOKENIZER = $$PWD/css/tokenizer.flex
+
+DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
+
+CSSBISON = $$PWD/css/CSSGrammar.y
+
+HTML_NAMES = $$PWD/html/HTMLTagNames.in
+
+XML_NAMES = $$PWD/xml/xmlattrs.in
+
+ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
+
+COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
+
+WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
+
+WALDOCSSVALUES = $$PWD/css/CSSValueKeywords.in
+
+DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
+
+XPATHBISON = $$PWD/xml/XPathGrammar.y
+
+contains(DEFINES, ENABLE_SVG=1) {
+    EXTRACSSPROPERTIES += $$PWD/css/SVGCSSPropertyNames.in
+    EXTRACSSVALUES += $$PWD/css/SVGCSSValueKeywords.in
+}
+
+contains(DEFINES, ENABLE_WCSS=1) {
+    EXTRACSSPROPERTIES += $$PWD/css/WCSSPropertyNames.in
+    EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
+}
+
+STYLESHEETS_EMBED = \
+    $$PWD/css/html.css \
+    $$PWD/css/quirks.css \
+    $$PWD/css/svg.css \
+    $$PWD/css/view-source.css \
+    $$PWD/css/wml.css \
+    $$PWD/css/mediaControls.css \
+    $$PWD/css/mediaControlsQt.css
+
+IDL_BINDINGS += \
+    css/Counter.idl \
+    css/CSSCharsetRule.idl \
+    css/CSSFontFaceRule.idl \
+    css/CSSImportRule.idl \
+    css/CSSMediaRule.idl \
+    css/CSSPageRule.idl \
+    css/CSSPrimitiveValue.idl \
+    css/CSSRule.idl \
+    css/CSSRuleList.idl \
+    css/CSSStyleDeclaration.idl \
+    css/CSSStyleRule.idl \
+    css/CSSStyleSheet.idl \
+    css/CSSValue.idl \
+    css/CSSValueList.idl \
+    css/CSSVariablesDeclaration.idl \
+    css/CSSVariablesRule.idl \
+    css/Media.idl \
+    css/MediaList.idl \
+    css/RGBColor.idl \
+    css/Rect.idl \
+    css/StyleSheet.idl \
+    css/StyleSheetList.idl \
+    css/WebKitCSSKeyframeRule.idl \
+    css/WebKitCSSKeyframesRule.idl \
+    css/WebKitCSSMatrix.idl \
+    css/WebKitCSSTransformValue.idl \
+    dom/Attr.idl \
+    dom/BeforeLoadEvent.idl \
+    dom/CharacterData.idl \
+    dom/ClientRect.idl \
+    dom/ClientRectList.idl \
+    dom/Clipboard.idl \
+    dom/CDATASection.idl \
+    dom/Comment.idl \
+    dom/CompositionEvent.idl \
+    dom/DocumentFragment.idl \
+    dom/Document.idl \
+    dom/DocumentType.idl \
+    dom/DOMCoreException.idl \
+    dom/DOMImplementation.idl \
+    dom/Element.idl \
+    dom/Entity.idl \
+    dom/EntityReference.idl \
+    dom/ErrorEvent.idl \
+    dom/Event.idl \
+    dom/EventException.idl \
+#    dom/EventListener.idl \
+#    dom/EventTarget.idl \
+    dom/KeyboardEvent.idl \
+    dom/MouseEvent.idl \
+    dom/MessageChannel.idl \
+    dom/MessageEvent.idl \
+    dom/MessagePort.idl \
+    dom/MutationEvent.idl \
+    dom/NamedNodeMap.idl \
+    dom/Node.idl \
+    dom/NodeFilter.idl \
+    dom/NodeIterator.idl \
+    dom/NodeList.idl \
+    dom/Notation.idl \
+    dom/OverflowEvent.idl \
+    dom/PageTransitionEvent.idl \
+    dom/PopStateEvent.idl \
+    dom/ProcessingInstruction.idl \
+    dom/ProgressEvent.idl \
+    dom/RangeException.idl \
+    dom/Range.idl \
+    dom/Text.idl \
+    dom/TextEvent.idl \
+    dom/Touch.idl \
+    dom/TouchEvent.idl \
+    dom/TouchList.idl \
+    dom/TreeWalker.idl \
+    dom/UIEvent.idl \
+    dom/WebKitAnimationEvent.idl \
+    dom/WebKitTransitionEvent.idl \
+    dom/WheelEvent.idl \
+    html/canvas/WebGLArray.idl \
+    html/canvas/WebGLArrayBuffer.idl \
+    html/canvas/WebGLByteArray.idl \
+    html/canvas/WebGLFloatArray.idl \
+    html/canvas/CanvasGradient.idl \
+    html/canvas/WebGLIntArray.idl \
+    html/canvas/CanvasPattern.idl \
+    html/canvas/CanvasRenderingContext.idl \
+    html/canvas/CanvasRenderingContext2D.idl \
+    html/canvas/WebGLRenderingContext.idl \
+    html/canvas/WebGLShortArray.idl \
+    html/canvas/WebGLUnsignedByteArray.idl \
+    html/canvas/WebGLUnsignedIntArray.idl \
+    html/canvas/WebGLUnsignedShortArray.idl \
+    html/DataGridColumn.idl \
+    html/DataGridColumnList.idl \
+    html/File.idl \
+    html/FileList.idl \
+    html/HTMLAllCollection.idl \
+    html/HTMLAudioElement.idl \
+    html/HTMLAnchorElement.idl \
+    html/HTMLAppletElement.idl \
+    html/HTMLAreaElement.idl \
+    html/HTMLBaseElement.idl \
+    html/HTMLBaseFontElement.idl \
+    html/HTMLBlockquoteElement.idl \
+    html/HTMLBodyElement.idl \
+    html/HTMLBRElement.idl \
+    html/HTMLButtonElement.idl \
+    html/HTMLCanvasElement.idl \
+    html/HTMLCollection.idl \
+    html/HTMLDataGridElement.idl \
+    html/HTMLDataGridCellElement.idl \
+    html/HTMLDataGridColElement.idl \
+    html/HTMLDataGridRowElement.idl \
+    html/HTMLDataListElement.idl \
+    html/HTMLDirectoryElement.idl \
+    html/HTMLDivElement.idl \
+    html/HTMLDListElement.idl \
+    html/HTMLDocument.idl \
+    html/HTMLElement.idl \
+    html/HTMLEmbedElement.idl \
+    html/HTMLFieldSetElement.idl \
+    html/HTMLFontElement.idl \
+    html/HTMLFormElement.idl \
+    html/HTMLFrameElement.idl \
+    html/HTMLFrameSetElement.idl \
+    html/HTMLHeadElement.idl \
+    html/HTMLHeadingElement.idl \
+    html/HTMLHRElement.idl \
+    html/HTMLHtmlElement.idl \
+    html/HTMLIFrameElement.idl \
+    html/HTMLImageElement.idl \
+    html/HTMLInputElement.idl \
+    html/HTMLIsIndexElement.idl \
+    html/HTMLLabelElement.idl \
+    html/HTMLLegendElement.idl \
+    html/HTMLLIElement.idl \
+    html/HTMLLinkElement.idl \
+    html/HTMLMapElement.idl \
+    html/HTMLMarqueeElement.idl \
+    html/HTMLMediaElement.idl \
+    html/HTMLMenuElement.idl \
+    html/HTMLMetaElement.idl \
+    html/HTMLModElement.idl \
+    html/HTMLObjectElement.idl \
+    html/HTMLOListElement.idl \
+    html/HTMLOptGroupElement.idl \
+    html/HTMLOptionElement.idl \
+    html/HTMLOptionsCollection.idl \
+    html/HTMLParagraphElement.idl \
+    html/HTMLParamElement.idl \
+    html/HTMLPreElement.idl \
+    html/HTMLQuoteElement.idl \
+    html/HTMLScriptElement.idl \
+    html/HTMLSelectElement.idl \
+    html/HTMLSourceElement.idl \
+    html/HTMLStyleElement.idl \
+    html/HTMLTableCaptionElement.idl \
+    html/HTMLTableCellElement.idl \
+    html/HTMLTableColElement.idl \
+    html/HTMLTableElement.idl \
+    html/HTMLTableRowElement.idl \
+    html/HTMLTableSectionElement.idl \
+    html/HTMLTextAreaElement.idl \
+    html/HTMLTitleElement.idl \
+    html/HTMLUListElement.idl \
+    html/HTMLVideoElement.idl \
+    html/ImageData.idl \
+    html/MediaError.idl \
+    html/TextMetrics.idl \
+    html/TimeRanges.idl \
+    html/ValidityState.idl \
+    html/VoidCallback.idl \
+    inspector/InjectedScriptHost.idl \
+    inspector/InspectorBackend.idl \
+    inspector/InspectorFrontendHost.idl \
+    inspector/JavaScriptCallFrame.idl \
+    loader/appcache/DOMApplicationCache.idl \
+    page/BarInfo.idl \
+    page/Console.idl \
+    page/Coordinates.idl \
+    page/DOMSelection.idl \
+    page/DOMWindow.idl \
+    page/EventSource.idl \
+    page/Geolocation.idl \
+    page/Geoposition.idl \
+    page/History.idl \
+    page/Location.idl \
+    page/Navigator.idl \
+    page/PositionError.idl \
+    page/Screen.idl \
+    page/WebKitPoint.idl \
+    page/WorkerNavigator.idl \
+    plugins/Plugin.idl \
+    plugins/MimeType.idl \
+    plugins/PluginArray.idl \
+    plugins/MimeTypeArray.idl \
+    storage/Database.idl \
+    storage/Storage.idl \
+    storage/StorageEvent.idl \
+    storage/SQLError.idl \
+    storage/SQLResultSet.idl \
+    storage/SQLResultSetRowList.idl \
+    storage/SQLTransaction.idl \
+    svg/SVGZoomEvent.idl \
+    svg/SVGAElement.idl \
+    svg/SVGAltGlyphElement.idl \
+    svg/SVGAngle.idl \
+    svg/SVGAnimateColorElement.idl \
+    svg/SVGAnimatedAngle.idl \
+    svg/SVGAnimatedBoolean.idl \
+    svg/SVGAnimatedEnumeration.idl \
+    svg/SVGAnimatedInteger.idl \
+    svg/SVGAnimatedLength.idl \
+    svg/SVGAnimatedLengthList.idl \
+    svg/SVGAnimatedNumber.idl \
+    svg/SVGAnimatedNumberList.idl \
+    svg/SVGAnimatedPreserveAspectRatio.idl \
+    svg/SVGAnimatedRect.idl \
+    svg/SVGAnimatedString.idl \
+    svg/SVGAnimatedTransformList.idl \
+    svg/SVGAnimateElement.idl \
+    svg/SVGAnimateTransformElement.idl \
+    svg/SVGAnimationElement.idl \
+    svg/SVGCircleElement.idl \
+    svg/SVGClipPathElement.idl \
+    svg/SVGColor.idl \
+    svg/SVGComponentTransferFunctionElement.idl \
+    svg/SVGCursorElement.idl \
+    svg/SVGDefsElement.idl \
+    svg/SVGDescElement.idl \
+    svg/SVGDocument.idl \
+    svg/SVGElement.idl \
+    svg/SVGElementInstance.idl \
+    svg/SVGElementInstanceList.idl \
+    svg/SVGEllipseElement.idl \
+    svg/SVGException.idl \
+    svg/SVGFEBlendElement.idl \
+    svg/SVGFEColorMatrixElement.idl \
+    svg/SVGFEComponentTransferElement.idl \
+    svg/SVGFECompositeElement.idl \
+    svg/SVGFEDiffuseLightingElement.idl \
+    svg/SVGFEDisplacementMapElement.idl \
+    svg/SVGFEDistantLightElement.idl \
+    svg/SVGFEFloodElement.idl \
+    svg/SVGFEFuncAElement.idl \
+    svg/SVGFEFuncBElement.idl \
+    svg/SVGFEFuncGElement.idl \
+    svg/SVGFEFuncRElement.idl \
+    svg/SVGFEGaussianBlurElement.idl \
+    svg/SVGFEImageElement.idl \
+    svg/SVGFEMergeElement.idl \
+    svg/SVGFEMergeNodeElement.idl \
+    svg/SVGFEMorphologyElement.idl \
+    svg/SVGFEOffsetElement.idl \
+    svg/SVGFEPointLightElement.idl \
+    svg/SVGFESpecularLightingElement.idl \
+    svg/SVGFESpotLightElement.idl \
+    svg/SVGFETileElement.idl \
+    svg/SVGFETurbulenceElement.idl \
+    svg/SVGFilterElement.idl \
+    svg/SVGFontElement.idl \
+    svg/SVGFontFaceElement.idl \
+    svg/SVGFontFaceFormatElement.idl \
+    svg/SVGFontFaceNameElement.idl \
+    svg/SVGFontFaceSrcElement.idl \
+    svg/SVGFontFaceUriElement.idl \
+    svg/SVGForeignObjectElement.idl \
+    svg/SVGGElement.idl \
+    svg/SVGGlyphElement.idl \
+    svg/SVGGradientElement.idl \
+    svg/SVGHKernElement.idl \
+    svg/SVGImageElement.idl \
+    svg/SVGLength.idl \
+    svg/SVGLengthList.idl \
+    svg/SVGLinearGradientElement.idl \
+    svg/SVGLineElement.idl \
+    svg/SVGMarkerElement.idl \
+    svg/SVGMaskElement.idl \
+    svg/SVGMatrix.idl \
+    svg/SVGMetadataElement.idl \
+    svg/SVGMissingGlyphElement.idl \
+    svg/SVGNumber.idl \
+    svg/SVGNumberList.idl \
+    svg/SVGPaint.idl \
+    svg/SVGPathElement.idl \
+    svg/SVGPathSegArcAbs.idl \
+    svg/SVGPathSegArcRel.idl \
+    svg/SVGPathSegClosePath.idl \
+    svg/SVGPathSegCurvetoCubicAbs.idl \
+    svg/SVGPathSegCurvetoCubicRel.idl \
+    svg/SVGPathSegCurvetoCubicSmoothAbs.idl \
+    svg/SVGPathSegCurvetoCubicSmoothRel.idl \
+    svg/SVGPathSegCurvetoQuadraticAbs.idl \
+    svg/SVGPathSegCurvetoQuadraticRel.idl \
+    svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl \
+    svg/SVGPathSegCurvetoQuadraticSmoothRel.idl \
+    svg/SVGPathSeg.idl \
+    svg/SVGPathSegLinetoAbs.idl \
+    svg/SVGPathSegLinetoHorizontalAbs.idl \
+    svg/SVGPathSegLinetoHorizontalRel.idl \
+    svg/SVGPathSegLinetoRel.idl \
+    svg/SVGPathSegLinetoVerticalAbs.idl \
+    svg/SVGPathSegLinetoVerticalRel.idl \
+    svg/SVGPathSegList.idl \
+    svg/SVGPathSegMovetoAbs.idl \
+    svg/SVGPathSegMovetoRel.idl \
+    svg/SVGPatternElement.idl \
+    svg/SVGPoint.idl \
+    svg/SVGPointList.idl \
+    svg/SVGPolygonElement.idl \
+    svg/SVGPolylineElement.idl \
+    svg/SVGPreserveAspectRatio.idl \
+    svg/SVGRadialGradientElement.idl \
+    svg/SVGRectElement.idl \
+    svg/SVGRect.idl \
+    svg/SVGRenderingIntent.idl \
+    svg/SVGScriptElement.idl \
+    svg/SVGSetElement.idl \
+    svg/SVGStopElement.idl \
+    svg/SVGStringList.idl \
+    svg/SVGStyleElement.idl \
+    svg/SVGSVGElement.idl \
+    svg/SVGSwitchElement.idl \
+    svg/SVGSymbolElement.idl \
+    svg/SVGTextContentElement.idl \
+    svg/SVGTextElement.idl \
+    svg/SVGTextPathElement.idl \
+    svg/SVGTextPositioningElement.idl \
+    svg/SVGTitleElement.idl \
+    svg/SVGTransform.idl \
+    svg/SVGTransformList.idl \
+    svg/SVGTRefElement.idl \
+    svg/SVGTSpanElement.idl \
+    svg/SVGUnitTypes.idl \
+    svg/SVGUseElement.idl \
+    svg/SVGViewElement.idl \
+    websockets/WebSocket.idl \
+    workers/AbstractWorker.idl \
+    workers/DedicatedWorkerContext.idl \
+    workers/SharedWorker.idl \
+    workers/SharedWorkerContext.idl \
+    workers/Worker.idl \
+    workers/WorkerContext.idl \
+    workers/WorkerLocation.idl \
+    xml/DOMParser.idl \
+    xml/XMLHttpRequest.idl \
+    xml/XMLHttpRequestException.idl \
+    xml/XMLHttpRequestProgressEvent.idl \
+    xml/XMLHttpRequestUpload.idl \
+    xml/XMLSerializer.idl \
+    xml/XPathNSResolver.idl \
+    xml/XPathException.idl \
+    xml/XPathExpression.idl \
+    xml/XPathResult.idl \
+    xml/XPathEvaluator.idl \
+    xml/XSLTProcessor.idl
+
+contains(DEFINES, ENABLE_WML=1) {
+    wmlnames.output = $${WC_GENERATED_SOURCES_DIR}/WMLNames.cpp
+    wmlnames.input = WML_NAMES
+    wmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/wml/WMLTagNames.in --attrs $$PWD/wml/WMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+    wmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/WMLElementFactory.cpp
+    addExtraCompiler(wmlnames)
+}
+
+# GENERATOR 5-C:
+svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp
+svgnames.input = SVG_NAMES
+svgnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp
+addExtraCompiler(svgnames)
+
+# GENERATOR 5-D:
+xlinknames.output = $${WC_GENERATED_SOURCES_DIR}/XLinkNames.cpp
+xlinknames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/svg/xlinkattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
+xlinknames.input = XLINK_NAMES
+addExtraCompiler(xlinknames)
+
+# GENERATOR 6-A:
+cssprops.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+cssprops.input = WALDOCSSPROPS
+cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$PWD/css/makeprop.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
+addExtraCompiler(cssprops)
+
+# GENERATOR 6-B:
+cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.c
+cssvalues.input = WALDOCSSVALUES
+cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$PWD/css/makevalues.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
+cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
+addExtraCompiler(cssvalues)
+
+# GENERATOR 1: IDL compiler
+idl.output = $${WC_GENERATED_SOURCES_DIR}/JS${QMAKE_FILE_BASE}.cpp
+idl.input = IDL_BINDINGS
+idl.commands = perl -I$$PWD/bindings/scripts $$PWD/bindings/scripts/generate-bindings.pl --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator JS --include $$PWD/dom --include $$PWD/html --include $$PWD/xml --include $$PWD/svg --outputDir $$WC_GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
+idl.depends = $$PWD/bindings/scripts/generate-bindings.pl \
+              $$PWD/bindings/scripts/CodeGenerator.pm \
+              $$PWD/bindings/scripts/CodeGeneratorJS.pm \
+              $$PWD/bindings/scripts/IDLParser.pm \
+              $$PWD/bindings/scripts/IDLStructure.pm \
+              $$PWD/bindings/scripts/InFilesParser.pm
+addExtraCompiler(idl)
+
+# GENERATOR 3: tokenizer (flex)
+tokenizer.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+tokenizer.input = TOKENIZER
+tokenizer.commands = flex -t < ${QMAKE_FILE_NAME} | perl $$PWD/css/maketokenizer > ${QMAKE_FILE_OUT}
+addExtraCompiler(tokenizer)
+
+# GENERATOR 4: CSS grammar
+cssbison.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+cssbison.input = CSSBISON
+cssbison.commands = perl $$PWD/css/makegrammar.pl ${QMAKE_FILE_NAME} $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}
+cssbison.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(cssbison)
+
+# GENERATOR 5-A:
+htmlnames.output = $${WC_GENERATED_SOURCES_DIR}/HTMLNames.cpp
+htmlnames.input = HTML_NAMES
+htmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\"  --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
+htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
+htmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/HTMLElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp
+addExtraCompiler(htmlnames)
+
+# GENERATOR 5-B:
+xmlnames.output = $${WC_GENERATED_SOURCES_DIR}/XMLNames.cpp
+xmlnames.input = XML_NAMES
+xmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/xml/xmlattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
+addExtraCompiler(xmlnames)
+
+# GENERATOR 8-A:
+entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
+entities.input = ENTITIES_GPERF
+entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
+entities.clean = ${QMAKE_FILE_OUT}
+addExtraCompiler(entities)
+
+# GENERATOR 8-B:
+doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+doctypestrings.input = DOCTYPESTRINGS
+doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
+doctypestrings.clean = ${QMAKE_FILE_OUT}
+addExtraCompiler(doctypestrings)
+
+# GENERATOR 8-C:
+colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.c
+colordata.input = COLORDAT_GPERF
+colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
+addExtraCompiler(colordata)
+
+# GENERATOR 9:
+STYLESHEETS_EMBED_GENERATOR_SCRIPT = $$PWD/css/make-css-file-arrays.pl
+stylesheets.output = $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp
+stylesheets.input = STYLESHEETS_EMBED_GENERATOR_SCRIPT
+stylesheets.commands = perl $$PWD/css/make-css-file-arrays.pl --preprocessor \"$${QMAKE_MOC} -E\" $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED
+stylesheets.depends = $$STYLESHEETS_EMBED
+stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h
+addExtraCompiler(stylesheets, $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h)
+
+# GENERATOR 10: XPATH grammar
+xpathbison.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
+xpathbison.input = XPATHBISON
+xpathbison.commands = bison -d -p xpathyy ${QMAKE_FILE_NAME} -o $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp && $(MOVE) $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${WC_GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h
+xpathbison.depends = ${QMAKE_FILE_NAME}
+addExtraCompiler(xpathbison)
+
+# GENERATOR 11: WebKit Version
+# The appropriate Apple-maintained Version.xcconfig file for WebKit version information is in WebKit/mac/Configurations/.
+WEBKITVERSION_SCRIPT = $$PWD/../WebKit/scripts/generate-webkitversion.pl
+webkitversion.output = $${WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
+webkitversion.input = WEBKITVERSION_SCRIPT
+webkitversion.commands = perl $$PWD/../WebKit/scripts/generate-webkitversion.pl --config $$PWD/../WebKit/mac/Configurations/Version.xcconfig --outputDir $${WC_GENERATED_SOURCES_DIR}/
+webkitversion.depends = $$PWD/../WebKit/scripts/generate-webkitversion.pl
+webkitversion.clean = ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
+webkitversion.wkAddOutputToSources = false
+addExtraCompiler(webkitversion)
+
index 133c19ffbe0f1be91ac68b1bde5699d987c10dcd..0374891ad0800d1cf564b48ecd85704eaa35cc57 100644 (file)
@@ -36,8 +36,11 @@ TARGET = QtWebKit
 
 contains(QT_CONFIG, embedded):CONFIG += embedded
 
+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ..
+
 CONFIG(standalone_package) {
-    GENERATED_SOURCES_DIR = $$PWD/generated
+    isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/generated
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/../JavaScriptCore/generated
 
     CONFIG(QTDIR_build):include($$QT_SOURCE_TREE/src/qbase.pri)
     else: VERSION = 4.7.0
@@ -45,12 +48,12 @@ CONFIG(standalone_package) {
     PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h
     DEFINES *= NDEBUG
 } else {
+    isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = generated
+    isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../JavaScriptCore/generated
 
     CONFIG(debug, debug|release) {
-        isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug
         OBJECTS_DIR = obj/debug
     } else { # Release
-        isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release
         OBJECTS_DIR = obj/release
     }
 
@@ -61,8 +64,6 @@ CONFIG(standalone_package) {
     !static: DEFINES += QT_MAKEDLL
 }
 
-GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR${QMAKE_DIR_SEP}
-
 unix {
     QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtNetwork
 }
@@ -107,122 +108,45 @@ win32-g++ {
 # Assume that symbian OS always comes with sqlite
 symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite
 
-# Try to locate sqlite3 source
-CONFIG(QTDIR_build) {
-    SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/
-} else {
-    SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
-    isEmpty(SQLITE3SRCDIR) {
-        SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
-    } 
-}
-
-# Optional components (look for defs in config.h and included files!)
 
-contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
-    DEFINES+=ENABLE_DATABASE=0 ENABLE_DOM_STORAGE=0 ENABLE_ICONDATABASE=0 ENABLE_WORKERS=0 ENABLE_SHARED_WORKERS=0
-}
 
-# turn off SQLITE support if we do not have sqlite3 available
-!CONFIG(QTDIR_build):win32-*:!exists( $${SQLITE3SRCDIR}/sqlite3.c ): DEFINES += ENABLE_SQLITE=0 ENABLE_DATABASE=0 ENABLE_ICONDATABASE=0 ENABLE_OFFLINE_WEB_APPLICATIONS=0 ENABLE_DOM_STORAGE=0
-
-!contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=.): DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=1
-!contains(DEFINES, ENABLE_DATABASE=.): DEFINES += ENABLE_DATABASE=1
-!contains(DEFINES, ENABLE_EVENTSOURCE=.): DEFINES += ENABLE_EVENTSOURCE=1
-!contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=.): DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
-!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
-!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
-!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
-!contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=0
-
-# turn on SQLITE support if any of the dependent features are turned on
-!contains(DEFINES, ENABLE_SQLITE=.) {
-  contains(DEFINES, ENABLE_DATABASE=1)|contains(DEFINES, ENABLE_ICONDATABASE=1)|contains(DEFINES, ENABLE_DOM_STORAGE=1)|contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
-    DEFINES += ENABLE_SQLITE=1
-  } else {
-    DEFINES += ENABLE_SQLITE=0
-  }
-}
-
-!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
-!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
-!contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
-#!contains(DEFINES, ENABLE_XBL=.): DEFINES += ENABLE_XBL=1
-!contains(DEFINES, ENABLE_WCSS=.): DEFINES += ENABLE_WCSS=0
-!contains(DEFINES, ENABLE_WML=.): DEFINES += ENABLE_WML=0
-!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
-!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
-!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
-!contains(DEFINES, ENABLE_DATAGRID=.): DEFINES += ENABLE_DATAGRID=0
-
-# SVG support
-!contains(DEFINES, ENABLE_SVG=0) {
-    !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
-    !contains(DEFINES, ENABLE_SVG_FONTS=.): DEFINES += ENABLE_SVG_FONTS=1
-    !contains(DEFINES, ENABLE_SVG_FOREIGN_OBJECT=.): DEFINES += ENABLE_SVG_FOREIGN_OBJECT=1
-    !contains(DEFINES, ENABLE_SVG_ANIMATION=.): DEFINES += ENABLE_SVG_ANIMATION=1
-    !contains(DEFINES, ENABLE_SVG_AS_IMAGE=.): DEFINES += ENABLE_SVG_AS_IMAGE=1
-    !contains(DEFINES, ENABLE_SVG_USE=.): DEFINES += ENABLE_SVG_USE=1
-} else {
-    DEFINES += ENABLE_SVG_FONTS=0 ENABLE_SVG_FOREIGN_OBJECT=0 ENABLE_SVG_ANIMATION=0 ENABLE_SVG_AS_IMAGE=0 ENABLE_SVG_USE=0
-}
+RESOURCES += \
+    $$PWD/../WebCore/WebCore.qrc
 
-# HTML5 media support
-!contains(DEFINES, ENABLE_VIDEO=.) {
-    contains(QT_CONFIG, phonon):DEFINES += ENABLE_VIDEO=1
-    else:DEFINES += ENABLE_VIDEO=0
+!symbian {
+    RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc
 }
 
-# HTML5 datalist support
-!contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
+include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
 
-# Nescape plugins support (NPAPI)
-!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
-    unix|win32-*:!embedded:!wince*: {
-        DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
-    } else {
-        DEFINES += ENABLE_NETSCAPE_PLUGIN_API=0
+# Disable HTML5 media compilation if phonon is unavailable
+!contains(DEFINES, ENABLE_VIDEO=1) {
+    !contains(QT_CONFIG, phonon) {
+        DEFINES -= ENABLE_VIDEO=1
+        DEFINES += ENABLE_VIDEO=0
     }
 }
 
-# Web Socket support.
-!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
+# Extract sources to build from the generator definitions
+defineTest(addExtraCompiler) {
+    isEqual($${1}.wkAddOutputToSources, false): return(true)
 
-# XSLT support with QtXmlPatterns
-!contains(DEFINES, ENABLE_XSLT=.) {
-    contains(QT_CONFIG, xmlpatterns):!lessThan(QT_MINOR_VERSION, 5):DEFINES += ENABLE_XSLT=1
-    else:DEFINES += ENABLE_XSLT=0
-}
+    outputRule = $$eval($${1}.output)
+    input = $$eval($${1}.input)
+    input = $$eval($$input)
 
-
-!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
-    symbian: {
-        exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \
-        exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) {
-            DEFINES += ENABLE_QT_BEARER=1
-        }
+    for(file,input) {
+        base = $$basename(file)
+        base ~= s/\..+//
+        newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
+        SOURCES += $$newfile
     }
-}
-
-DEFINES += WTF_CHANGES=1
-
-# Enable touch event support with Qt 4.6
-!lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1
+    SOURCES += $$eval($${1}.wkExtraSources)
+    export(SOURCES)
 
-# Used to compute defaults for the build-webkit script
-CONFIG(compute_defaults) {
-    message($$DEFINES)
-    error("Done computing defaults")
+    return(true)
 }
-
-RESOURCES += \
-    $$PWD/../WebCore/WebCore.qrc
-
-!symbian {
-    RESOURCES += $$PWD/../WebCore/inspector/front-end/WebKit.qrc
-}
-
-include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
+include(WebCore.pri)
 
 INCLUDEPATH = \
     $$PWD \
@@ -267,7 +191,7 @@ INCLUDEPATH = \
     $$PWD/wml \
     $$PWD/workers \
     $$PWD/xml \
-    $$GENERATED_SOURCES_DIR \
+    $$WC_GENERATED_SOURCES_DIR \
     $$INCLUDEPATH
 
 INCLUDEPATH = \
@@ -281,27 +205,6 @@ INCLUDEPATH = \
 
 QT += network
 
-QMAKE_EXTRA_TARGETS += generated_files
-
-FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
-
-TOKENIZER = $$PWD/css/tokenizer.flex
-
-DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
-
-CSSBISON = $$PWD/css/CSSGrammar.y
-
-HTML_NAMES = $$PWD/html/HTMLTagNames.in
-
-XML_NAMES = $$PWD/xml/xmlattrs.in
-
-ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
-
-COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
-
-WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
-
-WALDOCSSVALUES = $$PWD/css/CSSValueKeywords.in
 
 DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
 
@@ -316,378 +219,6 @@ contains(DEFINES, ENABLE_WCSS=1) {
     EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
 }
 
-STYLESHEETS_EMBED = \
-    $$PWD/css/html.css \
-    $$PWD/css/quirks.css \
-    $$PWD/css/svg.css \
-    $$PWD/css/view-source.css \
-    $$PWD/css/wml.css \
-    $$PWD/css/mediaControls.css \
-    $$PWD/css/mediaControlsQt.css
-
-IDL_BINDINGS += \
-    css/Counter.idl \
-    css/CSSCharsetRule.idl \
-    css/CSSFontFaceRule.idl \
-    css/CSSImportRule.idl \
-    css/CSSMediaRule.idl \
-    css/CSSPageRule.idl \
-    css/CSSPrimitiveValue.idl \
-    css/CSSRule.idl \
-    css/CSSRuleList.idl \
-    css/CSSStyleDeclaration.idl \
-    css/CSSStyleRule.idl \
-    css/CSSStyleSheet.idl \
-    css/CSSValue.idl \
-    css/CSSValueList.idl \
-    css/CSSVariablesDeclaration.idl \
-    css/CSSVariablesRule.idl \
-    css/Media.idl \
-    css/MediaList.idl \
-    css/RGBColor.idl \
-    css/Rect.idl \
-    css/StyleSheet.idl \
-    css/StyleSheetList.idl \
-    css/WebKitCSSKeyframeRule.idl \
-    css/WebKitCSSKeyframesRule.idl \
-    css/WebKitCSSMatrix.idl \
-    css/WebKitCSSTransformValue.idl \
-    dom/Attr.idl \
-    dom/BeforeLoadEvent.idl \
-    dom/CharacterData.idl \
-    dom/ClientRect.idl \
-    dom/ClientRectList.idl \
-    dom/Clipboard.idl \
-    dom/CDATASection.idl \
-    dom/Comment.idl \
-    dom/CompositionEvent.idl \
-    dom/DocumentFragment.idl \
-    dom/Document.idl \
-    dom/DocumentType.idl \
-    dom/DOMCoreException.idl \
-    dom/DOMImplementation.idl \
-    dom/Element.idl \
-    dom/Entity.idl \
-    dom/EntityReference.idl \
-    dom/ErrorEvent.idl \
-    dom/Event.idl \
-    dom/EventException.idl \
-#    dom/EventListener.idl \
-#    dom/EventTarget.idl \
-    dom/KeyboardEvent.idl \
-    dom/MouseEvent.idl \
-    dom/MessageChannel.idl \
-    dom/MessageEvent.idl \
-    dom/MessagePort.idl \
-    dom/MutationEvent.idl \
-    dom/NamedNodeMap.idl \
-    dom/Node.idl \
-    dom/NodeFilter.idl \
-    dom/NodeIterator.idl \
-    dom/NodeList.idl \
-    dom/Notation.idl \
-    dom/OverflowEvent.idl \
-    dom/PageTransitionEvent.idl \
-    dom/PopStateEvent.idl \
-    dom/ProcessingInstruction.idl \
-    dom/ProgressEvent.idl \
-    dom/RangeException.idl \
-    dom/Range.idl \
-    dom/Text.idl \
-    dom/TextEvent.idl \
-    dom/Touch.idl \
-    dom/TouchEvent.idl \
-    dom/TouchList.idl \
-    dom/TreeWalker.idl \
-    dom/UIEvent.idl \
-    dom/WebKitAnimationEvent.idl \
-    dom/WebKitTransitionEvent.idl \
-    dom/WheelEvent.idl \
-    html/canvas/WebGLArray.idl \
-    html/canvas/WebGLArrayBuffer.idl \
-    html/canvas/WebGLByteArray.idl \
-    html/canvas/WebGLFloatArray.idl \
-    html/canvas/CanvasGradient.idl \
-    html/canvas/WebGLIntArray.idl \
-    html/canvas/CanvasPattern.idl \
-    html/canvas/CanvasRenderingContext.idl \
-    html/canvas/CanvasRenderingContext2D.idl \
-    html/canvas/WebGLRenderingContext.idl \
-    html/canvas/WebGLShortArray.idl \
-    html/canvas/WebGLUnsignedByteArray.idl \
-    html/canvas/WebGLUnsignedIntArray.idl \
-    html/canvas/WebGLUnsignedShortArray.idl \
-    html/DataGridColumn.idl \
-    html/DataGridColumnList.idl \
-    html/File.idl \
-    html/FileList.idl \
-    html/HTMLAllCollection.idl \
-    html/HTMLAudioElement.idl \
-    html/HTMLAnchorElement.idl \
-    html/HTMLAppletElement.idl \
-    html/HTMLAreaElement.idl \
-    html/HTMLBaseElement.idl \
-    html/HTMLBaseFontElement.idl \
-    html/HTMLBlockquoteElement.idl \
-    html/HTMLBodyElement.idl \
-    html/HTMLBRElement.idl \
-    html/HTMLButtonElement.idl \
-    html/HTMLCanvasElement.idl \
-    html/HTMLCollection.idl \
-    html/HTMLDataGridElement.idl \
-    html/HTMLDataGridCellElement.idl \
-    html/HTMLDataGridColElement.idl \
-    html/HTMLDataGridRowElement.idl \
-    html/HTMLDataListElement.idl \
-    html/HTMLDirectoryElement.idl \
-    html/HTMLDivElement.idl \
-    html/HTMLDListElement.idl \
-    html/HTMLDocument.idl \
-    html/HTMLElement.idl \
-    html/HTMLEmbedElement.idl \
-    html/HTMLFieldSetElement.idl \
-    html/HTMLFontElement.idl \
-    html/HTMLFormElement.idl \
-    html/HTMLFrameElement.idl \
-    html/HTMLFrameSetElement.idl \
-    html/HTMLHeadElement.idl \
-    html/HTMLHeadingElement.idl \
-    html/HTMLHRElement.idl \
-    html/HTMLHtmlElement.idl \
-    html/HTMLIFrameElement.idl \
-    html/HTMLImageElement.idl \
-    html/HTMLInputElement.idl \
-    html/HTMLIsIndexElement.idl \
-    html/HTMLLabelElement.idl \
-    html/HTMLLegendElement.idl \
-    html/HTMLLIElement.idl \
-    html/HTMLLinkElement.idl \
-    html/HTMLMapElement.idl \
-    html/HTMLMarqueeElement.idl \
-    html/HTMLMediaElement.idl \
-    html/HTMLMenuElement.idl \
-    html/HTMLMetaElement.idl \
-    html/HTMLModElement.idl \
-    html/HTMLObjectElement.idl \
-    html/HTMLOListElement.idl \
-    html/HTMLOptGroupElement.idl \
-    html/HTMLOptionElement.idl \
-    html/HTMLOptionsCollection.idl \
-    html/HTMLParagraphElement.idl \
-    html/HTMLParamElement.idl \
-    html/HTMLPreElement.idl \
-    html/HTMLQuoteElement.idl \
-    html/HTMLScriptElement.idl \
-    html/HTMLSelectElement.idl \
-    html/HTMLSourceElement.idl \
-    html/HTMLStyleElement.idl \
-    html/HTMLTableCaptionElement.idl \
-    html/HTMLTableCellElement.idl \
-    html/HTMLTableColElement.idl \
-    html/HTMLTableElement.idl \
-    html/HTMLTableRowElement.idl \
-    html/HTMLTableSectionElement.idl \
-    html/HTMLTextAreaElement.idl \
-    html/HTMLTitleElement.idl \
-    html/HTMLUListElement.idl \
-    html/HTMLVideoElement.idl \
-    html/ImageData.idl \
-    html/MediaError.idl \
-    html/TextMetrics.idl \
-    html/TimeRanges.idl \
-    html/ValidityState.idl \
-    html/VoidCallback.idl \
-    inspector/InjectedScriptHost.idl \
-    inspector/InspectorBackend.idl \
-    inspector/InspectorFrontendHost.idl \
-    inspector/JavaScriptCallFrame.idl \
-    loader/appcache/DOMApplicationCache.idl \
-    page/BarInfo.idl \
-    page/Console.idl \
-    page/Coordinates.idl \
-    page/DOMSelection.idl \
-    page/DOMWindow.idl \
-    page/EventSource.idl \
-    page/Geolocation.idl \
-    page/Geoposition.idl \
-    page/History.idl \
-    page/Location.idl \
-    page/Navigator.idl \
-    page/PositionError.idl \
-    page/Screen.idl \
-    page/WebKitPoint.idl \
-    page/WorkerNavigator.idl \
-    plugins/Plugin.idl \
-    plugins/MimeType.idl \
-    plugins/PluginArray.idl \
-    plugins/MimeTypeArray.idl \
-    storage/Database.idl \
-    storage/Storage.idl \
-    storage/StorageEvent.idl \
-    storage/SQLError.idl \
-    storage/SQLResultSet.idl \
-    storage/SQLResultSetRowList.idl \
-    storage/SQLTransaction.idl \
-    websockets/WebSocket.idl \
-    workers/AbstractWorker.idl \
-    workers/DedicatedWorkerContext.idl \
-    workers/SharedWorker.idl \
-    workers/SharedWorkerContext.idl \
-    workers/Worker.idl \
-    workers/WorkerContext.idl \
-    workers/WorkerLocation.idl \
-    xml/DOMParser.idl \
-    xml/XMLHttpRequest.idl \
-    xml/XMLHttpRequestException.idl \
-    xml/XMLHttpRequestProgressEvent.idl \
-    xml/XMLHttpRequestUpload.idl \
-    xml/XMLSerializer.idl \
-    xml/XPathNSResolver.idl \
-    xml/XPathException.idl \
-    xml/XPathExpression.idl \
-    xml/XPathResult.idl \
-    xml/XPathEvaluator.idl \
-    xml/XSLTProcessor.idl
-
-contains(DEFINES, ENABLE_SVG=1) {
-
-  IDL_BINDINGS += \
-    svg/SVGZoomEvent.idl \
-    svg/SVGAElement.idl \
-    svg/SVGAltGlyphElement.idl \
-    svg/SVGAngle.idl \
-    svg/SVGAnimateColorElement.idl \
-    svg/SVGAnimatedAngle.idl \
-    svg/SVGAnimatedBoolean.idl \
-    svg/SVGAnimatedEnumeration.idl \
-    svg/SVGAnimatedInteger.idl \
-    svg/SVGAnimatedLength.idl \
-    svg/SVGAnimatedLengthList.idl \
-    svg/SVGAnimatedNumber.idl \
-    svg/SVGAnimatedNumberList.idl \
-    svg/SVGAnimatedPreserveAspectRatio.idl \
-    svg/SVGAnimatedRect.idl \
-    svg/SVGAnimatedString.idl \
-    svg/SVGAnimatedTransformList.idl \
-    svg/SVGAnimateElement.idl \
-    svg/SVGAnimateTransformElement.idl \
-    svg/SVGAnimationElement.idl \
-    svg/SVGCircleElement.idl \
-    svg/SVGClipPathElement.idl \
-    svg/SVGColor.idl \
-    svg/SVGComponentTransferFunctionElement.idl \
-    svg/SVGCursorElement.idl \
-    svg/SVGDefsElement.idl \
-    svg/SVGDescElement.idl \
-    svg/SVGDocument.idl \
-    svg/SVGElement.idl \
-    svg/SVGElementInstance.idl \
-    svg/SVGElementInstanceList.idl \
-    svg/SVGEllipseElement.idl \
-    svg/SVGException.idl \
-    svg/SVGFEBlendElement.idl \
-    svg/SVGFEColorMatrixElement.idl \
-    svg/SVGFEComponentTransferElement.idl \
-    svg/SVGFECompositeElement.idl \
-    svg/SVGFEDiffuseLightingElement.idl \
-    svg/SVGFEDisplacementMapElement.idl \
-    svg/SVGFEDistantLightElement.idl \
-    svg/SVGFEFloodElement.idl \
-    svg/SVGFEFuncAElement.idl \
-    svg/SVGFEFuncBElement.idl \
-    svg/SVGFEFuncGElement.idl \
-    svg/SVGFEFuncRElement.idl \
-    svg/SVGFEGaussianBlurElement.idl \
-    svg/SVGFEImageElement.idl \
-    svg/SVGFEMergeElement.idl \
-    svg/SVGFEMergeNodeElement.idl \
-    svg/SVGFEMorphologyElement.idl \
-    svg/SVGFEOffsetElement.idl \
-    svg/SVGFEPointLightElement.idl \
-    svg/SVGFESpecularLightingElement.idl \
-    svg/SVGFESpotLightElement.idl \
-    svg/SVGFETileElement.idl \
-    svg/SVGFETurbulenceElement.idl \
-    svg/SVGFilterElement.idl \
-    svg/SVGFontElement.idl \
-    svg/SVGFontFaceElement.idl \
-    svg/SVGFontFaceFormatElement.idl \
-    svg/SVGFontFaceNameElement.idl \
-    svg/SVGFontFaceSrcElement.idl \
-    svg/SVGFontFaceUriElement.idl \
-    svg/SVGForeignObjectElement.idl \
-    svg/SVGGElement.idl \
-    svg/SVGGlyphElement.idl \
-    svg/SVGGradientElement.idl \
-    svg/SVGHKernElement.idl \
-    svg/SVGImageElement.idl \
-    svg/SVGLength.idl \
-    svg/SVGLengthList.idl \
-    svg/SVGLinearGradientElement.idl \
-    svg/SVGLineElement.idl \
-    svg/SVGMarkerElement.idl \
-    svg/SVGMaskElement.idl \
-    svg/SVGMatrix.idl \
-    svg/SVGMetadataElement.idl \
-    svg/SVGMissingGlyphElement.idl \
-    svg/SVGNumber.idl \
-    svg/SVGNumberList.idl \
-    svg/SVGPaint.idl \
-    svg/SVGPathElement.idl \
-    svg/SVGPathSegArcAbs.idl \
-    svg/SVGPathSegArcRel.idl \
-    svg/SVGPathSegClosePath.idl \
-    svg/SVGPathSegCurvetoCubicAbs.idl \
-    svg/SVGPathSegCurvetoCubicRel.idl \
-    svg/SVGPathSegCurvetoCubicSmoothAbs.idl \
-    svg/SVGPathSegCurvetoCubicSmoothRel.idl \
-    svg/SVGPathSegCurvetoQuadraticAbs.idl \
-    svg/SVGPathSegCurvetoQuadraticRel.idl \
-    svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl \
-    svg/SVGPathSegCurvetoQuadraticSmoothRel.idl \
-    svg/SVGPathSeg.idl \
-    svg/SVGPathSegLinetoAbs.idl \
-    svg/SVGPathSegLinetoHorizontalAbs.idl \
-    svg/SVGPathSegLinetoHorizontalRel.idl \
-    svg/SVGPathSegLinetoRel.idl \
-    svg/SVGPathSegLinetoVerticalAbs.idl \
-    svg/SVGPathSegLinetoVerticalRel.idl \
-    svg/SVGPathSegList.idl \
-    svg/SVGPathSegMovetoAbs.idl \
-    svg/SVGPathSegMovetoRel.idl \
-    svg/SVGPatternElement.idl \
-    svg/SVGPoint.idl \
-    svg/SVGPointList.idl \
-    svg/SVGPolygonElement.idl \
-    svg/SVGPolylineElement.idl \
-    svg/SVGPreserveAspectRatio.idl \
-    svg/SVGRadialGradientElement.idl \
-    svg/SVGRectElement.idl \
-    svg/SVGRect.idl \
-    svg/SVGRenderingIntent.idl \
-    svg/SVGScriptElement.idl \
-    svg/SVGSetElement.idl \
-    svg/SVGStopElement.idl \
-    svg/SVGStringList.idl \
-    svg/SVGStyleElement.idl \
-    svg/SVGSVGElement.idl \
-    svg/SVGSwitchElement.idl \
-    svg/SVGSymbolElement.idl \
-    svg/SVGTextContentElement.idl \
-    svg/SVGTextElement.idl \
-    svg/SVGTextPathElement.idl \
-    svg/SVGTextPositioningElement.idl \
-    svg/SVGTitleElement.idl \
-    svg/SVGTransform.idl \
-    svg/SVGTransformList.idl \
-    svg/SVGTRefElement.idl \
-    svg/SVGTSpanElement.idl \
-    svg/SVGUnitTypes.idl \
-    svg/SVGUseElement.idl \
-    svg/SVGViewElement.idl
-
-}
-
 SOURCES += \
     accessibility/AccessibilityImageMapLink.cpp \
     accessibility/AccessibilityMediaControls.cpp \    
@@ -2583,30 +2114,6 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
         plugins/PluginViewNone.cpp
 }
 
-contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
-}
-
-contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
-}
-
-contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0) {
-    DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
-}
-
-contains(DEFINES, ENABLE_DATAGRID=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATAGRID=1
-}
-
-contains(DEFINES, ENABLE_EVENTSOURCE=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_EVENTSOURCE=1
-}
-
-contains(DEFINES, ENABLE_TOUCH_EVENTS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_TOUCH_EVENTS=1
-}
-
 contains(DEFINES, ENABLE_SQLITE=1) {
     !system-sqlite:exists( $${SQLITE3SRCDIR}/sqlite3.c ) {
             # Build sqlite3 into WebCore from source
@@ -2640,8 +2147,6 @@ contains(DEFINES, ENABLE_SQLITE=1) {
 
 
 contains(DEFINES, ENABLE_DATABASE=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_DATABASE=1
-
     SOURCES += \
         storage/ChangeVersionWrapper.cpp \
         storage/DatabaseTask.cpp \
@@ -2665,8 +2170,6 @@ contains(DEFINES, ENABLE_DATABASE=1) {
 }
 
 contains(DEFINES, ENABLE_DOM_STORAGE=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_DOM_STORAGE=1
-
     HEADERS += \
         storage/ChangeVersionWrapper.h \
         storage/DatabaseAuthorizer.h \
@@ -2721,8 +2224,6 @@ contains(DEFINES, ENABLE_ICONDATABASE=1) {
 }
 
 contains(DEFINES, ENABLE_WORKERS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_WORKERS=1
-
     SOURCES += \
         bindings/js/JSAbstractWorkerCustom.cpp \
         bindings/js/JSDedicatedWorkerContextCustom.cpp \
@@ -2746,8 +2247,6 @@ contains(DEFINES, ENABLE_WORKERS=1) {
 }
 
 contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_SHARED_WORKERS=1
-
     SOURCES += \
         bindings/js/JSSharedWorkerConstructor.cpp \
         bindings/js/JSSharedWorkerCustom.cpp \
@@ -2758,8 +2257,6 @@ contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
 }
 
 contains(DEFINES, ENABLE_VIDEO=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
-
     SOURCES += \
         html/HTMLAudioElement.cpp \
         html/HTMLMediaElement.cpp \
@@ -2792,10 +2289,6 @@ contains(DEFINES, ENABLE_VIDEO=1) {
 }
 
 contains(DEFINES, ENABLE_XPATH=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
-
-    XPATHBISON = $$PWD/xml/XPathGrammar.y
-
     SOURCES += \
         xml/NativeXPathNSResolver.cpp \
         xml/XPathEvaluator.cpp \
@@ -2818,8 +2311,6 @@ contains(DEFINES, ENABLE_XPATH=1) {
 unix:!mac:CONFIG += link_pkgconfig
 
 contains(DEFINES, ENABLE_XSLT=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
-
     QT += xmlpatterns
 
     SOURCES += \
@@ -2831,10 +2322,6 @@ contains(DEFINES, ENABLE_XSLT=1) {
         xml/XSLTProcessorQt.cpp
 }
 
-contains(DEFINES, ENABLE_XBL=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XBL=1
-}
-
 contains(DEFINES, ENABLE_FILTERS=1) {
     SOURCES += \
         platform/graphics/filters/FEBlend.cpp \
@@ -2845,16 +2332,6 @@ contains(DEFINES, ENABLE_FILTERS=1) {
         platform/graphics/filters/FilterEffect.cpp \
         platform/graphics/filters/SourceAlpha.cpp \
         platform/graphics/filters/SourceGraphic.cpp
-
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
-}
-
-contains(DEFINES, ENABLE_WCSS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
-    contains(DEFINES, ENABLE_XHTMLMP=0) {
-        DEFINES -= ENABLE_XHTMLMP=0
-        DEFINES += ENABLE_XHTMLMP=1
-    }
 }
 
 contains(DEFINES, ENABLE_WML=1) {
@@ -2895,30 +2372,9 @@ contains(DEFINES, ENABLE_WML=1) {
         wml/WMLTemplateElement.cpp \
         wml/WMLTimerElement.cpp \
         wml/WMLVariables.cpp
-
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_WML=1
-
-    WML_NAMES = $$PWD/wml/WMLTagNames.in
-
-    wmlnames_a.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLNames.cpp
-    wmlnames_a.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/wml/WMLTagNames.in --attrs $$PWD/wml/WMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
-    wmlnames_a.input = WML_NAMES
-    wmlnames_a.dependency_type = TYPE_C
-    wmlnames_a.CONFIG = target_predeps
-    wmlnames_a.variable_out = GENERATED_SOURCES
-    addExtraCompilerWithHeader(wmlnames_a)
-    wmlnames_b.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLElementFactory.cpp
-    wmlnames_b.commands = @echo -n ''
-    wmlnames_b.input = SVG_NAMES
-    wmlnames_b.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WMLNames.cpp
-    wmlnames_b.CONFIG = target_predeps
-    wmlnames_b.variable_out = GENERATED_SOURCES
-    addExtraCompilerWithHeader(wmlnames_b)
 }
 
 contains(DEFINES, ENABLE_XHTMLMP=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
-    
     SOURCES += \
         html/HTMLNoScriptElement.cpp
 }
@@ -2935,12 +2391,6 @@ contains(DEFINES, ENABLE_QT_BEARER=1) {
 }
 
 contains(DEFINES, ENABLE_SVG=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
-
-    SVG_NAMES = $$PWD/svg/svgtags.in
-
-    XLINK_NAMES = $$PWD/svg/xlinkattrs.in
-
     SOURCES += \
 # TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
         bindings/js/JSSVGElementInstanceCustom.cpp \
@@ -3137,70 +2587,9 @@ contains(DEFINES, ENABLE_SVG=1) {
         rendering/SVGMarkerLayoutInfo.cpp \
         rendering/SVGRenderSupport.cpp \
         rendering/SVGRootInlineBox.cpp
-
-
-        # GENERATOR 5-C:
-        svgnames_a.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
-        svgnames_a.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
-        svgnames_a.input = SVG_NAMES
-        svgnames_a.dependency_type = TYPE_C
-        svgnames_a.CONFIG = target_predeps
-        svgnames_a.variable_out = GENERATED_SOURCES
-        addExtraCompilerWithHeader(svgnames_a)
-        svgnames_b.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGElementFactory.cpp
-        svgnames_b.commands = @echo -n ''
-        svgnames_b.input = SVG_NAMES
-        svgnames_b.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
-        svgnames_b.CONFIG = target_predeps
-        svgnames_b.variable_out = GENERATED_SOURCES
-        addExtraCompilerWithHeader(svgnames_b)
-        svgelementwrapper.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSSVGElementWrapperFactory.cpp
-        svgelementwrapper.commands = @echo -n ''
-        svgelementwrapper.input = SVG_NAMES
-        svgelementwrapper.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
-        svgelementwrapper.CONFIG = target_predeps
-        svgelementwrapper.variable_out = GENERATED_SOURCES
-        addExtraCompiler(svgelementwrapper)
-        svgelementwrapper_header.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSSVGElementWrapperFactory.h
-        svgelementwrapper_header.commands = @echo -n ''
-        svgelementwrapper_header.input = SVG_NAMES
-        svgelementwrapper_header.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}SVGNames.cpp
-        svgelementwrapper_header.CONFIG = target_predeps
-        svgelementwrapper_header.variable_out = GENERATED_FILES
-        addExtraCompiler(svgelementwrapper_header)
-
-        # GENERATOR 5-D:
-        xlinknames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}XLinkNames.cpp
-        xlinknames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/svg/xlinkattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$GENERATED_SOURCES_DIR
-        xlinknames.input = XLINK_NAMES
-        xlinknames.dependency_type = TYPE_C
-        xlinknames.CONFIG = target_predeps
-        xlinknames.variable_out = GENERATED_SOURCES
-        addExtraCompilerWithHeader(xlinknames)
-
-} 
-# GENERATOR 6-A:
-cssprops.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-cssprops.input = WALDOCSSPROPS
-cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES $$EXTRACSSPROPERTIES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makeprop.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
-cssprops.CONFIG = target_predeps no_link
-cssprops.variable_out =
-cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES EXTRACSSPROPERTIES
-addExtraCompilerWithHeader(cssprops)
-
-# GENERATOR 6-B:
-cssvalues.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.c
-cssvalues.input = WALDOCSSVALUES
-cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.in && cd $$GENERATED_SOURCES_DIR && perl $$PWD/css/makevalues.pl && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.strip ${QMAKE_FILE_BASE}.gperf
-cssvalues.CONFIG = target_predeps no_link
-cssvalues.variable_out =
-cssvalues.depend = ${QMAKE_FILE_NAME} EXTRACSSVALUES
-cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
-addExtraCompiler(cssvalues)
+}
 
 contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_JAVASCRIPT_DEBUGGER=1
-
     SOURCES += \
         bindings/js/JSJavaScriptCallFrameCustom.cpp \
         inspector/JavaScriptCallFrame.cpp \
@@ -3210,8 +2599,6 @@ contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
 }
 
 contains(DEFINES, ENABLE_OFFLINE_WEB_APPLICATIONS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_OFFLINE_WEB_APPLICATIONS=1
-
 SOURCES += \
     loader/appcache/ApplicationCache.cpp \
     loader/appcache/ApplicationCacheGroup.cpp \
@@ -3224,8 +2611,6 @@ SOURCES += \
 }
 
 contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
-    FEATURE_DEFINES_JAVASCRIPT += ENABLE_WEB_SOCKETS=1
-
 SOURCES += \
     websockets/WebSocket.cpp \
     websockets/WebSocketChannel.cpp \
@@ -3243,138 +2628,6 @@ SOURCES += \
 }
 }
 
-# GENERATOR 1: IDL compiler
-idl.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JS${QMAKE_FILE_BASE}.cpp
-idl.variable_out = GENERATED_SOURCES
-idl.input = IDL_BINDINGS
-idl.commands = perl -I$$PWD/bindings/scripts $$PWD/bindings/scripts/generate-bindings.pl --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator JS --include $$PWD/dom --include $$PWD/html --include $$PWD/xml --include $$PWD/svg --outputDir $$GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
-idl.depends = $$PWD/bindings/scripts/generate-bindings.pl \
-              $$PWD/bindings/scripts/CodeGenerator.pm \
-              $$PWD/bindings/scripts/CodeGeneratorJS.pm \
-              $$PWD/bindings/scripts/IDLParser.pm \
-              $$PWD/bindings/scripts/IDLStructure.pm \
-              $$PWD/bindings/scripts/InFilesParser.pm
-idl.CONFIG += target_predeps
-addExtraCompilerWithHeader(idl)
-
-# GENERATOR 3: tokenizer (flex)
-tokenizer.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-tokenizer.commands = flex -t < ${QMAKE_FILE_NAME} | perl $$PWD/css/maketokenizer > ${QMAKE_FILE_OUT}
-tokenizer.dependency_type = TYPE_C
-tokenizer.input = TOKENIZER
-tokenizer.CONFIG += target_predeps no_link
-tokenizer.variable_out =
-addExtraCompiler(tokenizer)
-
-# GENERATOR 4: CSS grammar
-cssbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-cssbison.commands = perl $$PWD/css/makegrammar.pl ${QMAKE_FILE_NAME} $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}
-cssbison.depend = ${QMAKE_FILE_NAME}
-cssbison.input = CSSBISON
-cssbison.CONFIG = target_predeps
-cssbison.dependency_type = TYPE_C
-cssbison.variable_out = GENERATED_SOURCES
-addExtraCompilerWithHeader(cssbison)
-
-# GENERATOR 5-A:
-htmlnames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-htmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\"  --factory --wrapperFactory --outputDir $$GENERATED_SOURCES_DIR
-htmlnames.input = HTML_NAMES
-htmlnames.dependency_type = TYPE_C
-htmlnames.CONFIG = target_predeps
-htmlnames.variable_out = GENERATED_SOURCES
-htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
-addExtraCompilerWithHeader(htmlnames)
-
-htmlelementfactory.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLElementFactory.cpp
-htmlelementfactory.commands = @echo -n ''
-htmlelementfactory.input = HTML_NAMES
-htmlelementfactory.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-htmlelementfactory.CONFIG = target_predeps
-htmlelementfactory.variable_out = GENERATED_SOURCES
-htmlelementfactory.clean += ${QMAKE_FILE_OUT}
-addExtraCompilerWithHeader(htmlelementfactory)
-
-elementwrapperfactory.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}JSHTMLElementWrapperFactory.cpp
-elementwrapperfactory.commands = @echo -n ''
-elementwrapperfactory.input = HTML_NAMES
-elementwrapperfactory.depends = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLNames.cpp
-elementwrapperfactory.CONFIG = target_predeps
-elementwrapperfactory.variable_out = GENERATED_SOURCES
-elementwrapperfactory.clean += ${QMAKE_FILE_OUT}
-addExtraCompilerWithHeader(elementwrapperfactory)
-
-# GENERATOR 5-B:
-xmlnames.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}XMLNames.cpp
-xmlnames.commands = perl -I$$PWD/bindings/scripts $$PWD/dom/make_names.pl --attrs $$PWD/xml/xmlattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$GENERATED_SOURCES_DIR
-xmlnames.input = XML_NAMES
-xmlnames.dependency_type = TYPE_C
-xmlnames.CONFIG = target_predeps
-xmlnames.variable_out = GENERATED_SOURCES
-addExtraCompilerWithHeader(xmlnames)
-
-# GENERATOR 8-A:
-entities.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLEntityNames.c
-entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}HTMLEntityNames.c
-entities.input = ENTITIES_GPERF
-entities.dependency_type = TYPE_C
-entities.CONFIG = target_predeps no_link
-entities.variable_out =
-entities.clean = ${QMAKE_FILE_OUT}
-addExtraCompiler(entities)
-
-# GENERATOR 8-B:
-doctypestrings.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-doctypestrings.input = DOCTYPESTRINGS
-doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
-doctypestrings.dependency_type = TYPE_C
-doctypestrings.CONFIG += target_predeps no_link
-doctypestrings.variable_out =
-doctypestrings.clean = ${QMAKE_FILE_OUT}
-addExtraCompiler(doctypestrings)
-
-# GENERATOR 8-C:
-colordata.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}ColorData.c
-colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
-colordata.input = COLORDAT_GPERF
-colordata.CONFIG = target_predeps no_link
-colordata.variable_out =
-addExtraCompiler(colordata)
-
-# GENERATOR 9:
-stylesheets.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}UserAgentStyleSheetsData.cpp
-stylesheets.commands = perl $$PWD/css/make-css-file-arrays.pl --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED
-STYLESHEETS_EMBED_GENERATOR_SCRIPT = $$PWD/css/make-css-file-arrays.pl
-stylesheets.input = STYLESHEETS_EMBED_GENERATOR_SCRIPT
-stylesheets.depends = $$STYLESHEETS_EMBED
-stylesheets.CONFIG = target_predeps
-stylesheets.variable_out = GENERATED_SOURCES
-stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}UserAgentStyleSheets.h
-addExtraCompilerWithHeader(stylesheets, $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}UserAgentStyleSheets.h)
-
-# GENERATOR 10: XPATH grammar
-xpathbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp
-xpathbison.commands = bison -d -p xpathyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${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
-addExtraCompilerWithHeader(xpathbison)
-
-# GENERATOR 11: WebKit Version
-# The appropriate Apple-maintained Version.xcconfig file for WebKit version information is in WebKit/mac/Configurations/.
-webkitversion.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}WebKitVersion.h
-webkitversion.commands = perl $$PWD/../WebKit/scripts/generate-webkitversion.pl --config $$PWD/../WebKit/mac/Configurations/Version.xcconfig --outputDir $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}
-WEBKITVERSION_SCRIPT = $$PWD/../WebKit/scripts/generate-webkitversion.pl
-webkitversion.input = WEBKITVERSION_SCRIPT
-webkitversion.CONFIG = target_predeps
-webkitversion.depend = $$PWD/../WebKit/scripts/generate-webkitversion.pl
-webkitversion.variable_out = GENERATED_SOURCES
-webkitversion.clean = ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}WebKitVersion.h
-addExtraCompiler(webkitversion)
-
-
 include($$PWD/../WebKit/qt/Api/headers.pri)
 HEADERS += $$WEBKIT_API_HEADERS
 !CONFIG(standalone_package) {
index 4de615b7125a2a2b7730b9742e4fb5eb3d3d0e76..a60394babc8e2143eaa8d426e8618496e7fd2a1a 100644 (file)
@@ -80,69 +80,3 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
 # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
 win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
 
-#
-# For builds inside Qt we interpret the output rule and the input of each extra compiler manually
-# and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
-# all the generated files. We do not need to generate any extra compiler rules in that case.
-#
-# In addition this function adds a new target called 'generated_files' that allows manually calling
-# all the extra compilers to generate all the necessary files for the build using 'make generated_files'
-#
-defineTest(addExtraCompiler) {
-    CONFIG(standalone_package) {
-        outputRule = $$eval($${1}.output)
-        outVariable = $$eval($${1}.variable_out)
-        !isEqual(outVariable,GENERATED_SOURCES):return(true)
-
-        input = $$eval($${1}.input)
-        input = $$eval($$input)
-
-        for(file,input) {
-            base = $$basename(file)
-            base ~= s/\..+//
-            newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
-            SOURCES += $$newfile
-        }
-
-        export(SOURCES)
-    } else {
-        QMAKE_EXTRA_COMPILERS += $$1
-        generated_files.depends += compiler_$${1}_make_all
-        export(QMAKE_EXTRA_COMPILERS)
-        export(generated_files.depends)
-    }
-    return(true)
-}
-
-defineTest(addExtraCompilerWithHeader) {
-    addExtraCompiler($$1)
-
-    eval(headerFile = $${2})
-    isEmpty(headerFile) {
-        eval($${1}_header.output = $$eval($${1}.output))
-        eval($${1}_header.output ~= s/\.cpp/.h/)
-        eval($${1}_header.output ~= s/\.c/.h/)
-    } else {
-        eval($${1}_header.output = $$headerFile)
-    }
-
-    eval($${1}_header.input = $$eval($${1}.input))
-    eval($${1}_header.commands = @echo -n '')
-    eval($${1}_header.depends = compiler_$${1}_make_all)
-    eval($${1}_header.variable_out = GENERATED_FILES)
-
-    export($${1}_header.output)
-    export($${1}_header.input)
-    export($${1}_header.commands)
-    export($${1}_header.depends)
-    export($${1}_header.variable_out)
-
-    !CONFIG(standalone_package): QMAKE_EXTRA_COMPILERS += $${1}_header
-
-    export(QMAKE_EXTRA_COMPILERS)
-    export(generated_files.depends)
-    export(SOURCES)
-
-    return(true)
-}
-
index fe2839c6a1a4fd5fd7ef0bf2f1edb6d3804d14d5..d3187fb88ff65ccca48fad3fa93f807b40d8b996 100644 (file)
@@ -1,3 +1,12 @@
+2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Split the build process in two different .pro files.
+        This allows qmake to be run once all source files are available.
+
+        * Scripts/webkitdirs.pm: Add calls to make DerivedSources.pro in JSC and WC.
+
 2010-01-13  Shinichiro Hamaji  <hamaji@chromium.org>
 
         Unreviewed tiny typo fix in docstrings.
index ce9ccacd2f574b0cc17eab86c6b8e8214b5df75b..1100b43936319d72a21aafb555f579770309af05 100644 (file)
@@ -32,6 +32,7 @@ use warnings;
 use Config;
 use FindBin;
 use File::Basename;
+use File::Path;
 use File::Spec;
 use POSIX;
 use VCSUtils;
@@ -1449,6 +1450,41 @@ sub buildQMakeProject($@)
     my $make = qtMakeCommand($qmakebin);
     my $config = configuration();
     my $prefix = $ENV{"WebKitInstallationPrefix"};
+    my $dir = File::Spec->canonpath(baseProductDir());
+    File::Path::mkpath($dir);
+    $dir = File::Spec->catfile($dir, $config);
+    File::Path::mkpath($dir);
+    chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+    print "Generating derived sources\n\n";
+
+    my @dsQmakeArgs = @buildArgs;
+    push @dsQmakeArgs, "-r";
+    push @dsQmakeArgs, sourceDir() . "/DerivedSources.pro";
+    push @dsQmakeArgs, "CONFIG-=release";
+    push @dsQmakeArgs, "CONFIG+=debug";
+    print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
+    my $result = system "$qmakebin @dsQmakeArgs";
+    if ($result ne 0) {
+        die "Failed while running $qmakebin to generate derived sources!\n";
+    }
+
+    my $dsMakefile = "Makefile.DerivedSources";
+    # This is to overcome a problem of qmake when generating Makefiles with extra targets for windows.
+    # The configuration doesn't matter for source generation, just use debug.
+    $dsMakefile .= ".Debug" if (isCygwin() || isWindows());
+
+    print "Calling '$make $makeargs -f $dsMakefile generated_files' in " . $dir . "/JavaScriptCore\n\n";
+    $result = system "pushd JavaScriptCore && $make $makeargs -f $dsMakefile generated_files && popd";
+    if ($result ne 0) {
+        die "Failed to generate JavaScriptCore's derived sources!\n";
+    }
+    print "Calling '$make $makeargs -f $dsMakefile generated_files' in " . $dir . "/WebCore\n\n";
+    $result = system "pushd WebCore && $make $makeargs -f $dsMakefile generated_files && popd";
+    if ($result ne 0) {
+        die "Failed to generate WebCore's derived sources!\n";
+    }
+
 
     push @buildArgs, "OUTPUT_DIR=" . baseProductDir() . "/$config";
     push @buildArgs, sourceDir() . "/WebKit.pro";
@@ -1466,36 +1502,19 @@ sub buildQMakeProject($@)
         }
     }
 
-    my $dir = File::Spec->canonpath(baseProductDir());
-    my @mkdirArgs;
-    push @mkdirArgs, "-p" if !isWindows();
-    if (! -d $dir) {
-        system "mkdir", @mkdirArgs, "$dir";
-        if (! -d $dir) {
-            die "Failed to create product directory " . $dir;
-        }
-    }
-    $dir = File::Spec->catfile($dir, $config);
-    if (! -d $dir) {
-        system "mkdir", @mkdirArgs, "$dir";
-        if (! -d $dir) {
-            die "Failed to create build directory " . $dir;
-        }
-    }
-
-    chdir $dir or die "Failed to cd into " . $dir . "\n";
-
     print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
     print "Installation directory: $prefix\n" if(defined($prefix));
 
-    my $result = system "$qmakebin @buildArgs";
+    $result = system "$qmakebin @buildArgs";
     if ($result ne 0) {
        die "Failed to setup build environment using $qmakebin!\n";
     }
 
     if ($clean) {
+      print "Calling '$make $makeargs distclean' in " . $dir . "\n\n";
       $result = system "$make $makeargs distclean";
     } else {
+      print "Calling '$make $makeargs' in " . $dir . "\n\n";
       $result = system "$make $makeargs";
     }