public
Description: A mirror of QtWebKit
Homepage: http://trac.webkit.org/projects/webkit/wiki/QtWebKit
Clone URL: git://github.com/tronical/qtwebkit.git
2008-07-25  Simon Hausmann  <hausmann@webkit.org>

        Discussed with and rubber-stamped by Lars.

        Fix the build system for the Qt port.

        Recent JavaScriptCore changes require the addition of 
        JavaScriptCore/API to the
        include search path. With a build process that combines 
        JavaScriptCore and
        WebCore in one build process/Makefile the existance of
        JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include 
        conflicts.

        This commit solves this by introducing a separate build of 
        JavaScriptCore into
        a static library.

        As a result of the split-up a race-condition due to broken 
        dependencies of
        regular source files to header files of generated sources showed 
        up very
        frequently when doing parallel builds (which the buildbot does). 
        This commit at
        the same time tries to address the dependency problem by making 
        the
        addExtraCompiler() function also generate a pseudo extra compiler 
        that
        represents the header file output, so that qmake is aware of the 
        creation of
        the header file for dependency calculation.

        At the same time I removed a lot of cruft from the pro files to 
        ease maintenance.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35335 
268f45cc-cd09-0410-ab3c-d52691b4dbfc
hausmann@webkit.org (author)
Fri Jul 25 03:55:33 -0700 2008
commit  bb87b70de45f175c93ee55fa1fd13b31dac1c330
tree    8053c82946494f2e821a914908eea459d8d97286
parent  390c390c9a6867bfdb4d6d82609e24abcf4762a2
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -1,3 +1,30 @@
0
+2008-07-25 Simon Hausmann <hausmann@webkit.org>
0
+
0
+ Discussed with and rubber-stamped by Lars.
0
+
0
+ Fix the build system for the Qt port.
0
+
0
+ Recent JavaScriptCore changes require the addition of JavaScriptCore/API to the
0
+ include search path. With a build process that combines JavaScriptCore and
0
+ WebCore in one build process/Makefile the existance of
0
+ JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include conflicts.
0
+
0
+ This commit solves this by introducing a separate build of JavaScriptCore into
0
+ a static library.
0
+
0
+ As a result of the split-up a race-condition due to broken dependencies of
0
+ regular source files to header files of generated sources showed up very
0
+ frequently when doing parallel builds (which the buildbot does). This commit at
0
+ the same time tries to address the dependency problem by making the
0
+ addExtraCompiler() function also generate a pseudo extra compiler that
0
+ represents the header file output, so that qmake is aware of the creation of
0
+ the header file for dependency calculation.
0
+
0
+ At the same time I removed a lot of cruft from the pro files to ease maintenance.
0
+
0
+ * WebKit.pri:
0
+ * WebKit.pro:
0
+
0
 2008-06-18 Marco Barisione <marco.barisione@collabora.co.uk>
0
 
0
         Reviewed by Alp Toker.
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
@@ -1,3 +1,31 @@
0
+2008-07-25 Simon Hausmann <hausmann@webkit.org>
0
+
0
+ Discussed with and rubber-stamped by Lars.
0
+
0
+ Fix the build system for the Qt port.
0
+
0
+ Recent JavaScriptCore changes require the addition of JavaScriptCore/API to the
0
+ include search path. With a build process that combines JavaScriptCore and
0
+ WebCore in one build process/Makefile the existance of
0
+ JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include conflicts.
0
+
0
+ This commit solves this by introducing a separate build of JavaScriptCore into
0
+ a static library.
0
+
0
+ As a result of the split-up a race-condition due to broken dependencies of
0
+ regular source files to header files of generated sources showed up very
0
+ frequently when doing parallel builds (which the buildbot does). This commit at
0
+ the same time tries to address the dependency problem by making the
0
+ addExtraCompiler() function also generate a pseudo extra compiler that
0
+ represents the header file output, so that qmake is aware of the creation of
0
+ the header file for dependency calculation.
0
+
0
+ At the same time I removed a lot of cruft from the pro files to ease maintenance.
0
+
0
+ * JavaScriptCore.pri:
0
+ * JavaScriptCore.pro: Added.
0
+ * kjs/jsc.pro:
0
+
0
 2008-07-24 Geoffrey Garen <ggaren@apple.com>
0
 
0
         Reviewed by Maciej Stachowiak.
...
2
3
4
5
6
7
 
 
8
9
10
11
12
 
 
 
13
14
15
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
...
176
177
178
179
180
 
...
2
3
4
 
 
 
5
6
7
8
 
 
9
10
11
12
13
14
15
...
142
143
144
 
 
 
 
 
 
 
 
 
 
145
146
147
...
166
167
168
 
 
169
0
@@ -2,14 +2,14 @@
0
 VPATH += $$PWD
0
 
0
 INCLUDEPATH += tmp
0
-INCLUDEPATH += $$PWD $$PWD/kjs $$PWD/wtf $$PWD/wtf/unicode $$PWD/VM $$PWD/profiler
0
-DEPENDPATH += $$PWD $$PWD/kjs $$PWD/wtf $$PWD/wtf/unicode $$PWD/VM $$PWD/profiler
0
-DEFINES -= KJS_IDENTIFIER_HIDE_GLOBALS
0
+INCLUDEPATH += $$PWD $$PWD/kjs $$PWD/wtf $$PWD/wtf/unicode $$PWD/VM $$PWD/profiler $$PWD/API $$PWD/.. \
0
+ $$PWD/ForwardingHeaders
0
 DEFINES += BUILDING_QT__
0
 
0
-win32-msvc*: INCLUDEPATH += $$PWD/os-win32
0
-
0
 isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
0
+GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
0
+win32-*: GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
0
+
0
 
0
 include(pcre/pcre.pri)
0
 
0
@@ -142,16 +142,6 @@ SOURCES += \
0
     wtf/ThreadingQt.cpp \
0
     wtf/qt/MainThreadQt.cpp
0
 
0
-!CONFIG(QTDIR_build) {
0
- defineTest(addExtraCompiler) {
0
- QMAKE_EXTRA_COMPILERS += $$1
0
- generated_files.depends += compiler_$${1}_make_all
0
- export(QMAKE_EXTRA_COMPILERS)
0
- export(generated_files.depends)
0
- return(true)
0
- }
0
-}
0
-
0
 # GENERATOR 1-A: LUT creator
0
 lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
0
 lut.commands = perl $$PWD/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
0
@@ -176,5 +166,4 @@ kjsbison.input = KJSBISON
0
 kjsbison.variable_out = GENERATED_SOURCES
0
 kjsbison.dependency_type = TYPE_C
0
 kjsbison.CONFIG = target_predeps
0
-kjsbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR}${QMAKE_FILE_BASE}.h
0
-addExtraCompiler(kjsbison)
0
+addExtraCompilerWithHeader(kjsbison)
...
3
4
5
6
7
8
9
...
17
18
19
 
 
20
21
22
...
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
...
3
4
5
 
6
7
8
...
16
17
18
19
20
21
22
23
...
29
30
31
 
 
 
 
 
 
 
 
 
 
 
32
33
34
0
@@ -3,7 +3,6 @@ TARGET = jsc
0
 DESTDIR = ..
0
 SOURCES = Shell.cpp
0
 QT -= gui
0
-DEFINES -= KJS_IDENTIFIER_HIDE_GLOBALS
0
 INCLUDEPATH += $$PWD/.. \
0
     $$PWD \
0
     $$PWD/../bindings \
0
@@ -17,6 +16,8 @@ CONFIG(release) {
0
     DEFINES += NDEBUG USE_SYSTEM_MALLOC
0
 }
0
 
0
+include($$PWD/../../WebKit.pri)
0
+
0
 CONFIG += link_pkgconfig
0
 
0
 QMAKE_RPATHDIR += $$OUTPUT_DIR/lib
0
@@ -28,17 +29,6 @@ OBJECTS_DIR_WTR = $$OBJECTS_DIR/
0
 win32-*: OBJECTS_DIR_WTR ~= s|/|\|
0
 include($$PWD/../JavaScriptCore.pri)
0
 
0
-# Hack! Fix this.
0
-SOURCES -= API/JSBase.cpp \
0
- API/JSCallbackConstructor.cpp \
0
- API/JSCallbackFunction.cpp \
0
- API/JSCallbackObject.cpp \
0
- API/JSClassRef.cpp \
0
- API/JSContextRef.cpp \
0
- API/JSObjectRef.cpp \
0
- API/JSStringRef.cpp \
0
- API/JSValueRef.cpp
0
-
0
 lessThan(QT_MINOR_VERSION, 4) {
0
     DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""
0
 }
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
0
@@ -1,3 +1,29 @@
0
+2008-07-25 Simon Hausmann <hausmann@webkit.org>
0
+
0
+ Discussed with and rubber-stamped by Lars.
0
+
0
+ Fix the build system for the Qt port.
0
+
0
+ Recent JavaScriptCore changes require the addition of JavaScriptCore/API to the
0
+ include search path. With a build process that combines JavaScriptCore and
0
+ WebCore in one build process/Makefile the existance of
0
+ JavaScriptCore/API/Node.h and WebCore/dom/Node.h causes include conflicts.
0
+
0
+ This commit solves this by introducing a separate build of JavaScriptCore into
0
+ a static library.
0
+
0
+ As a result of the split-up a race-condition due to broken dependencies of
0
+ regular source files to header files of generated sources showed up very
0
+ frequently when doing parallel builds (which the buildbot does). This commit at
0
+ the same time tries to address the dependency problem by making the
0
+ addExtraCompiler() function also generate a pseudo extra compiler that
0
+ represents the header file output, so that qmake is aware of the creation of
0
+ the header file for dependency calculation.
0
+
0
+ At the same time I removed a lot of cruft from the pro files to ease maintenance.
0
+
0
+ * WebCore.pro:
0
+
0
 2008-07-24 kevino <kevino@theolliviers.com>
0
 
0
         wx build fix on Win for plugins coode.
...
1
2
3
4
5
6
 
7
8
9
...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
...
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
 
 
 
 
105
106
107
108
109
110
111
112
113
 
 
 
114
115
116
117
118
 
119
120
 
 
121
122
123
124
125
126
127
128
129
130
...
141
142
143
144
145
146
147
148
149
...
152
153
154
155
156
157
158
159
160
161
...
184
185
186
187
 
 
188
189
190
...
1259
1260
1261
1262
1263
1264
1265
1266
1267
...
1620
1621
1622
1623
1624
 
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1641
1642
1643
...
1646
1647
1648
1649
1650
 
1651
1652
1653
...
1655
1656
1657
1658
1659
 
1660
1661
1662
...
1664
1665
1666
1667
1668
 
1669
1670
1671
...
1673
1674
1675
1676
1677
 
1678
1679
1680
...
1692
1693
1694
1695
1696
 
1697
1698
1699
1700
1701
1702
1703
1704
 
 
 
 
 
 
1705
1706
1707
...
1728
1729
1730
1731
1732
1733
1734
1735
1736
 
1737
1738
1739
...
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
 
 
 
 
 
 
 
 
 
 
1755
1756
1757
...
1760
1761
1762
1763
1764
 
1765
1766
1767
...
1795
1796
1797
1798
 
1799
1800
1801
...
1805
1806
1807
1808
1809
 
1810
1811
1812
...
1
2
3
 
 
 
4
5
6
7
...
20
21
22
 
 
23
24
25
26
27
 
 
 
 
28
29
30
...
80
81
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
84
85
86
87
88
 
 
 
 
 
 
 
 
89
90
91
92
 
 
 
 
93
94
 
95
96
97
98
 
 
 
 
 
99
100
101
...
112
113
114
 
 
 
115
116
117
...
120
121
122
 
 
 
 
123
124
125
...
148
149
150
 
151
152
153
154
155
...
1224
1225
1226
 
 
 
1227
1228
1229
...
1582
1583
1584
 
 
1585
1586
1587
1588
1589
1590
1591
 
 
 
 
 
 
 
 
 
 
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
...
1612
1613
1614
 
 
1615
1616
1617
1618
...
1620
1621
1622
 
 
1623
1624
1625
1626
...
1628
1629
1630
 
 
1631
1632
1633
1634
...
1636
1637
1638
 
 
1639
1640
1641
1642
...
1654
1655
1656
 
 
1657
1658
1659
 
 
 
 
 
 
1660
1661
1662
1663
1664
1665
1666
1667
1668
...
1689
1690
1691
 
 
 
 
 
 
1692
1693
1694
1695
...
1698
1699
1700
 
 
 
 
 
 
 
 
 
 
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
...
1716
1717
1718
 
 
1719
1720
1721
1722
...
1750
1751
1752
 
1753
1754
1755
1756
...
1760
1761
1762
 
 
1763
1764
1765
1766
0
@@ -1,9 +1,7 @@
0
 # -*- Mode:makefile -*-
0
 # WebCore - qmake build info
0
 CONFIG += building-libs
0
-# do not use implicit rules in nmake Makefiles to avoid the clash
0
-# of API/Node.c and dom/Node.cpp
0
-CONFIG += no_batch
0
+CONFIG += depend_includepath
0
 include($$PWD/../WebKit.pri)
0
 
0
 TEMPLATE = lib
0
@@ -22,17 +20,11 @@ isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
0
 GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
0
 win32-*: GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
0
 
0
-INCLUDEPATH += $$GENERATED_SOURCES_DIR
0
-
0
 !CONFIG(QTDIR_build) {
0
      OBJECTS_DIR = tmp
0
      DESTDIR = $$OUTPUT_DIR/lib
0
 }
0
 
0
-DEPENDPATH += css dom loader editing history html \
0
- loader/icon page platform platform/graphics platform/graphics/filters platform/network platform/text plugins rendering rendering/style xml \
0
- bindings/js bridge bridge/c bridge/qt
0
-
0
 include($$OUTPUT_DIR/config.pri)
0
 
0
 CONFIG -= warn_on
0
@@ -88,43 +80,22 @@ DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1
0
 
0
 DEFINES += WTF_CHANGES=1
0
 
0
-#
0
-# For builds inside Qt we interpret the output rule and the input of each extra compiler manually
0
-# and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
0
-# all the generated files. We do not need to generate any extra compiler rules in that case.
0
-#
0
-# In addition this function adds a new target called 'generated_files' that allows manually calling
0
-# all the extra compilers to generate all the necessary files for the build using 'make generated_files'
0
-#
0
-defineTest(addExtraCompiler) {
0
- CONFIG(QTDIR_build) {
0
- outputRule = $$eval($${1}.output)
0
-
0
- input = $$eval($${1}.input)
0
- input = $$eval($$input)
0
+INCLUDEPATH += $$PWD/../JavaScriptCore $$PWD/../JavaScriptCore/ForwardingHeaders \
0
+ $$PWD/../JavaScriptCore/VM \
0
+ $$PWD/../JavaScriptCore/kjs \
0
+ $$PWD/../JavaScriptCore/bindings \
0
+ $$PWD/../JavaScriptCore/wtf
0
 
0
- for(file,input) {
0
- base = $$basename(file)
0
- base ~= s/\..+//
0
- newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
0
- SOURCES += $$newfile
0
- }
0
-
0
- export(SOURCES)
0
+contains(CONFIG, debug_and_release_target) {
0
+ CONFIG(debug, debug|release) {
0
+ LIBS+=-L../JavaScriptCore/debug
0
     } else {
0
- QMAKE_EXTRA_COMPILERS += $$1
0
- generated_files.depends += compiler_$${1}_make_all
0
- export(QMAKE_EXTRA_COMPILERS)
0
- export(generated_files.depends)
0
+ LIBS+=-L../JavaScriptCore/release
0
     }
0
- return(true)
0
+} else {
0
+ LIBS += -L../JavaScriptCore
0
 }
0
 
0
-include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
0
-
0
-#INCLUDEPATH += $$PWD/../JavaScriptCore
0
-#LIBS += -L$$OUTPUT_DIR/lib -lJavaScriptCore
0
-
0
 RESOURCES += \
0
     $$PWD/../WebCore/page/inspector/WebKit.qrc \
0
     $$PWD/../WebCore/Resources/WebKitResources.qrc \
0
@@ -141,9 +112,6 @@ INCLUDEPATH += \
0
     $$PWD/../WebKit/qt/Api \
0
     $$PWD/bridge/qt
0
 
0
-DEPENDPATH += editing/qt history/qt loader/qt page/qt \
0
- platform/graphics/qt ../WebKit/qt/Api ../WebKit/qt/WebCoreSupport
0
-
0
 # Make sure storage/ appears before JavaScriptCore/kjs. Both provide LocalStorage.h
0
 # but the header from the former include path is included across directories while
0
 # kjs/LocalStorage.h is included only from files within the same directory
0
@@ -152,10 +120,6 @@ INCLUDEPATH = $$PWD/storage $$INCLUDEPATH
0
 INCLUDEPATH += $$PWD \
0
                 $$PWD/ForwardingHeaders \
0
                 $$PWD/.. \
0
- $$PWD/../JavaScriptCore/VM \
0
- $$PWD/../JavaScriptCore/kjs \
0
- $$PWD/../JavaScriptCore/bindings \
0
- $$PWD/../JavaScriptCore/wtf \
0
                 $$PWD/platform \
0
                 $$PWD/platform/network \
0
                 $$PWD/platform/graphics \
0
@@ -184,7 +148,8 @@ INCLUDEPATH += $$PWD \
0
                 $$PWD/plugins \
0
                 $$PWD/bridge \
0
                 $$PWD/bridge/c \
0
- $$PWD/bridge/qt
0
+ $$PWD/bridge/qt \
0
+ $$GENERATED_SOURCES_DIR
0
 
0
 QT += network
0
 lessThan(QT_MINOR_VERSION, 4): QT += xml
0
@@ -1259,9 +1224,6 @@ contains(DEFINES, ENABLE_XBL=1) {
0
 contains(DEFINES, ENABLE_SVG=1) {
0
     FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
0
 
0
- DEPENDPATH += svg svg/graphics
0
- DEPENDPATH += svg/graphics/qt
0
-
0
     SVG_NAMES = $$PWD/svg/svgtags.in
0
 
0
     XLINK_NAMES = $$PWD/svg/xlinkattrs.in
0
@@ -1620,24 +1582,28 @@ SOURCES += \
0
         svgnames_a.dependency_type = TYPE_C
0
         svgnames_a.CONFIG = target_predeps
0
         svgnames_a.variable_out = GENERATED_SOURCES
0
- svgnames_a.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}SVGNames.h
0
- addExtraCompiler(svgnames_a)
0
+ addExtraCompilerWithHeader(svgnames_a)
0
         svgnames_b.output = $$GENERATED_SOURCES_DIR/SVGElementFactory.cpp
0
         svgnames_b.commands = @echo -n ''
0
         svgnames_b.input = SVG_NAMES
0
         svgnames_b.depends = $$GENERATED_SOURCES_DIR/SVGNames.cpp
0
         svgnames_b.CONFIG = target_predeps
0
         svgnames_b.variable_out = GENERATED_SOURCES
0
- svgnames_b.clean += ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}SVGElementFactory.h ${QMAKE_FILE_OUT}
0
- addExtraCompiler(svgnames_b)
0
- svgnames_c.output = $$GENERATED_SOURCES_DIR/JSSVGElementWrapperFactory.cpp
0
- svgnames_c.commands = @echo -n ''
0
- svgnames_c.input = SVG_NAMES
0
- svgnames_c.depends = $$GENERATED_SOURCES_DIR/SVGNames.cpp
0
- svgnames_c.CONFIG = target_predeps
0
- svgnames_c.variable_out = GENERATED_SOURCES
0
- svgnames_c.clean += ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}JSSVGElementWrapperFactory.h ${QMAKE_FILE_OUT}
0
- addExtraCompiler(svgnames_c)
0
+ addExtraCompilerWithHeader(svgnames_b)
0
+ svgelementwrapper.output = $$GENERATED_SOURCES_DIR/JSSVGElementWrapperFactory.cpp
0
+ svgelementwrapper.commands = @echo -n ''
0
+ svgelementwrapper.input = SVG_NAMES
0
+ svgelementwrapper.depends = $$GENERATED_SOURCES_DIR/SVGNames.cpp
0
+ svgelementwrapper.CONFIG = target_predeps
0
+ svgelementwrapper.variable_out = GENERATED_SOURCES
0
+ addExtraCompiler(svgelementwrapper)
0
+ svgelementwrapper_header.output = $$GENERATED_SOURCES_DIR/JSSVGElementWrapperFactory.h
0
+ svgelementwrapper_header.commands = @echo -n ''
0
+ svgelementwrapper_header.input = SVG_NAMES
0
+ svgelementwrapper_header.depends = $$GENERATED_SOURCES_DIR/SVGNames.cpp
0
+ svgelementwrapper_header.CONFIG = target_predeps
0
+ svgelementwrapper_header.variable_out = GENERATED_FILES
0
+ addExtraCompiler(svgelementwrapper_header)
0
 
0
         # GENERATOR 5-D:
0
         xlinknames.output = $$GENERATED_SOURCES_DIR/XLinkNames.cpp
0
@@ -1646,8 +1612,7 @@ SOURCES += \
0
         xlinknames.dependency_type = TYPE_C
0
         xlinknames.CONFIG = target_predeps
0
         xlinknames.variable_out = GENERATED_SOURCES
0
- xlinknames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}XLinkNames.h
0
- addExtraCompiler(xlinknames)
0
+ addExtraCompilerWithHeader(xlinknames)
0
 
0
     # GENERATOR 6-A:
0
     cssprops.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
0
@@ -1655,8 +1620,7 @@ SOURCES += \
0
     cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES $$SVGCSSPROPERTIES > $$GENERATED_SOURCES_DIR/${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
0
     cssprops.CONFIG = target_predeps no_link
0
     cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES SVGCSSPROPERTIES
0
- cssprops.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
0
- addExtraCompiler(cssprops)
0
+ addExtraCompilerWithHeader(cssprops)
0
 
0
     # GENERATOR 6-B:
0
     cssvalues.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.c
0
@@ -1664,8 +1628,7 @@ SOURCES += \
0
     cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$SVGCSSVALUES > $$GENERATED_SOURCES_DIR/${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
0
     cssvalues.CONFIG = target_predeps no_link
0
     cssvalues.depend = ${QMAKE_FILE_NAME} SVGCSSVALUES
0
- cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
0
- addExtraCompiler(cssvalues)
0
+ addExtraCompilerWithHeader(cssvalues)
0
 } else {
0
     # GENERATOR 6-A:
0
     cssprops.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.c
0
@@ -1673,8 +1636,7 @@ SOURCES += \
0
     cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$DASHBOARDSUPPORTCSSPROPERTIES > $$GENERATED_SOURCES_DIR/${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
0
     cssprops.CONFIG = target_predeps no_link
0
     cssprops.depend = ${QMAKE_FILE_NAME} DASHBOARDSUPPORTCSSPROPERTIES
0
- cssprops.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
0
- addExtraCompiler(cssprops)
0
+ addExtraCompilerWithHeader(cssprops)
0
 
0
     # GENERATOR 6-B:
0
     cssvalues.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.c
0
@@ -1692,16 +1654,15 @@ idl.variable_out = GENERATED_SOURCES
0
 idl.input = IDL_BINDINGS
0
 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}
0
 idl.CONFIG += target_predeps
0
-idl.clean = ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}JS${QMAKE_FILE_BASE}.h ${QMAKE_FILE_OUT}
0
-addExtraCompiler(idl)
0
+addExtraCompilerWithHeader(idl)
0
 
0
 # GENERATOR 2-A: LUT creator
0
-#lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
0
-#lut.commands = perl $$PWD/../JavaScriptCore/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
0
-#lut.depend = ${QMAKE_FILE_NAME}
0
-#lut.input = LUT_FILES
0
-#lut.CONFIG += no_link
0
-#QMAKE_EXTRA_COMPILERS += lut
0
+lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
0
+lut.commands = perl $$PWD/../JavaScriptCore/kjs/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
0
+lut.depend = ${QMAKE_FILE_NAME}
0
+lut.input = LUT_FILES
0
+lut.CONFIG += no_link
0
+addExtraCompiler(lut)
0
 
0
 # GENERATOR 2-B: like JavaScriptCore/LUT Generator, but rename output
0
 luttable.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}Table.cpp
0
@@ -1728,12 +1689,7 @@ cssbison.input = CSSBISON
0
 cssbison.CONFIG = target_predeps
0
 cssbison.dependency_type = TYPE_C
0
 cssbison.variable_out = GENERATED_SOURCES
0
-cssbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
0
-addExtraCompiler(cssbison)
0
-#PRE_TARGETDEPS += $$GENERATED_SOURCES_DIR/CSSGrammar.cpp
0
-grammar_h_dep.target = tmp/CSSParser.o
0
-grammar_h_dep.depends = $$GENERATED_SOURCES_DIR/CSSGrammar.cpp $$GENERATED_SOURCES_DIR/HTMLNames.cpp
0
-QMAKE_EXTRA_TARGETS += grammar_h_dep
0
+addExtraCompilerWithHeader(cssbison)
0
 
0
 # GENERATOR 5-A:
0
 htmlnames.output = $$GENERATED_SOURCES_DIR/HTMLNames.cpp
0
@@ -1742,16 +1698,16 @@ htmlnames.input = HTML_NAMES
0
 htmlnames.dependency_type = TYPE_C
0
 htmlnames.CONFIG = target_predeps
0
 htmlnames.variable_out = GENERATED_SOURCES
0
-htmlnames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}HTMLNames.h
0
-addExtraCompiler(htmlnames)
0
-htmlnames_a.output = $$GENERATED_SOURCES_DIR/JSHTMLElementWrapperFactory.cpp
0
-htmlnames_a.commands = @echo -n ''
0
-htmlnames_a.input = HTML_NAMES
0
-htmlnames_a.depends = $$GENERATED_SOURCES_DIR/HTMLNames.cpp
0
-htmlnames_a.CONFIG = target_predeps
0
-htmlnames_a.variable_out = GENERATED_SOURCES
0
-htmlnames_a.clean += ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}JSHTMLElementWrapperFactory.h ${QMAKE_FILE_OUT}
0
-addExtraCompiler(htmlnames_a)
0
+addExtraCompilerWithHeader(htmlnames)
0
+
0
+elementwrapperfactory.output = $$GENERATED_SOURCES_DIR/JSHTMLElementWrapperFactory.cpp
0
+elementwrapperfactory.commands = @echo -n ''
0
+elementwrapperfactory.input = HTML_NAMES
0
+elementwrapperfactory.depends = $$GENERATED_SOURCES_DIR/HTMLNames.cpp
0
+elementwrapperfactory.CONFIG = target_predeps
0
+elementwrapperfactory.variable_out = GENERATED_SOURCES
0
+elementwrapperfactory.clean += ${QMAKE_FILE_OUT}
0
+addExtraCompilerWithHeader(elementwrapperfactory)
0
 
0
 # GENERATOR 5-B:
0
 xmlnames.output = $$GENERATED_SOURCES_DIR/XMLNames.cpp
0
@@ -1760,8 +1716,7 @@ xmlnames.input = XML_NAMES
0
 xmlnames.dependency_type = TYPE_C
0
 xmlnames.CONFIG = target_predeps
0
 xmlnames.variable_out = GENERATED_SOURCES
0
-xmlnames.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}XMLNames.h
0
-addExtraCompiler(xmlnames)
0
+addExtraCompilerWithHeader(xmlnames)
0
 
0
 # GENERATOR 8-A:
0
 entities.output = $$GENERATED_SOURCES_DIR/HTMLEntityNames.c
0
@@ -1795,7 +1750,7 @@ stylesheets.input = STYLESHEETS_EMBED
0
 stylesheets.CONFIG = target_predeps
0
 stylesheets.variable_out = GENERATED_SOURCES
0
 stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}UserAgentStyleSheets.h
0
-addExtraCompiler(stylesheets)
0
+addExtraCompilerWithHeader(stylesheets, $$GENERATED_SOURCES_DIR/UserAgentStyleSheets.h)
0
 
0
 # GENERATOR 10: XPATH grammar
0
 xpathbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
0
@@ -1805,8 +1760,7 @@ xpathbison.input = XPATHBISON
0
 xpathbison.CONFIG = target_predeps
0
 xpathbison.dependency_type = TYPE_C
0
 xpathbison.variable_out = GENERATED_SOURCES
0
-xpathbison.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_GENERATED_SOURCES_DIR_SLASH}${QMAKE_FILE_BASE}.h
0
-addExtraCompiler(xpathbison)
0
+addExtraCompilerWithHeader(xpathbison)
0
 
0
 !CONFIG(QTDIR_build) {
0
     target.path = $$[QT_INSTALL_LIBS]
...
7
8
9
10
 
 
 
11
12
13
...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
7
8
9
 
10
11
12
13
14
15
...
21
22
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
0
@@ -7,7 +7,9 @@ isEmpty(OUTPUT_DIR) {
0
 }
0
 
0
 DEFINES += BUILDING_QT__=1
0
-!building-libs {
0
+building-libs {
0
+ win32-msvc*: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
0
+} else {
0
     QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
0
     LIBS += -lQtWebKit
0
     DEPENDPATH += $$PWD/WebKit/qt/Api
0
@@ -19,27 +21,69 @@ CONFIG(release) {
0
 }
0
 
0
 BASE_DIR = $$PWD
0
-INCLUDEPATH += \
0
- $$PWD/WebKit/qt/Api \
0
- $$BASE_DIR/JavaScriptCore/ \
0
- $$BASE_DIR/JavaScriptCore/kjs \
0
- $$BASE_DIR/JavaScriptCore/bindings \
0
- $$BASE_DIR/JavaScriptCore/bindings/c \
0
- $$BASE_DIR/JavaScriptCore/wtf \
0
- $$BASE_DIR/JavaScriptCore/ForwardingHeaders \
0
- $$BASE_DIR/WebCore \
0
- $$BASE_DIR/WebCore/ForwardingHeaders \
0
- $$BASE_DIR/WebCore/platform \
0
- $$BASE_DIR/WebCore/platform/network \
0
- $$BASE_DIR/WebCore/platform/graphics \
0
- $$BASE_DIR/WebCore/loader \
0
- $$BASE_DIR/WebCore/page \
0
- $$BASE_DIR/WebCore/css \
0
- $$BASE_DIR/WebCore/dom \
0
- $$BASE_DIR/WebCore/bridge \
0
- $$BASE_DIR/WebCore/editing \
0
- $$BASE_DIR/WebCore/rendering \
0
- $$BASE_DIR/WebCore/history \
0
- $$BASE_DIR/WebCore/xml \
0
- $$BASE_DIR/WebCore/html \
0
- $$BASE_DIR/WebCore/plugins
0
+INCLUDEPATH += $$PWD/WebKit/qt/Api
0
+
0
+#
0
+# For builds inside Qt we interpret the output rule and the input of each extra compiler manually
0
+# and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
0
+# all the generated files. We do not need to generate any extra compiler rules in that case.
0
+#
0
+# In addition this function adds a new target called 'generated_files' that allows manually calling
0
+# all the extra compilers to generate all the necessary files for the build using 'make generated_files'
0
+#
0
+defineTest(addExtraCompiler) {
0
+ CONFIG(QTDIR_build) {
0
+ outputRule = $$eval($${1}.output)
0
+
0
+ input = $$eval($${1}.input)
0
+ input = $$eval($$input)
0
+
0
+ for(file,input) {
0
+ base = $$basename(file)
0
+ base ~= s/\..+//
0
+ newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
0
+ SOURCES += $$newfile
0
+ }
0
+
0
+ export(SOURCES)
0
+ } else {
0
+ QMAKE_EXTRA_COMPILERS += $$1
0
+ generated_files.depends += compiler_$${1}_make_all
0
+ export(QMAKE_EXTRA_COMPILERS)
0
+ export(generated_files.depends)
0
+ }
0
+ return(true)
0
+}
0
+
0
+defineTest(addExtraCompilerWithHeader) {
0
+ addExtraCompiler($$1)
0
+
0
+ eval(headerFile = $${2})
0
+ isEmpty(headerFile) {
0
+ eval($${1}_header.output = $$eval($${1}.output))
0
+ eval($${1}_header.output ~= s/\.cpp/.h/)
0
+ eval($${1}_header.output ~= s/\.c/.h/)
0
+ } else {
0
+ eval($${1}_header.output = $$headerFile)
0
+ }
0
+
0
+ eval($${1}_header.input = $$eval($${1}.input))
0
+ eval($${1}_header.commands = @echo -n '')
0
+ eval($${1}_header.depends = compiler_$${1}_make_all)
0
+ eval($${1}_header.variable_out = GENERATED_FILES)
0
+
0
+ export($${1}_header.output)
0
+ export($${1}_header.input)
0
+ export($${1}_header.commands)
0
+ export($${1}_header.depends)
0
+ export($${1}_header.variable_out)
0
+
0
+ !CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header
0
+
0
+ export(QMAKE_EXTRA_COMPILERS)
0
+ export(generated_files.depends)
0
+ export(SOURCES)
0
+
0
+ return(true)
0
+}
0
+
...
2
3
4
 
5
6
7
...
2
3
4
5
6
7
8
0
@@ -2,6 +2,7 @@ TEMPLATE = subdirs
0
 CONFIG += ordered
0
 
0
 SUBDIRS += \
0
+ JavaScriptCore \
0
         WebCore \
0
         JavaScriptCore/kjs/jsc.pro \
0
         WebKit/qt/QtLauncher

Comments

    No one has commented yet.