b73e9353b8e836fbcc352c2e1941be3f8287a7ac
[WebKit-https.git] / WebKit2 / DerivedSources.pro
1 TEMPLATE = lib
2 TARGET = dummy
3
4 CONFIG -= debug_and_release
5
6 WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \
7     $$OUTPUT_DIR/WebCore/generated/HTMLNames.h \
8     $$OUTPUT_DIR/WebCore/generated/JSCSSStyleDeclaration.h \
9     $$OUTPUT_DIR/WebCore/generated/JSDOMWindow.h \
10     $$OUTPUT_DIR/WebCore/generated/JSElement.h \
11     $$OUTPUT_DIR/WebCore/generated/JSHTMLElement.h \
12     $$OUTPUT_DIR/WebCore/generated/JSRange.h \
13
14
15 QUOTE = ""
16 DOUBLE_ESCAPED_QUOTE = ""
17 ESCAPE = ""
18 win32-msvc*|symbian {
19     ESCAPE = "^"
20 } else:win32-g++*:isEmpty(QMAKE_SH) {
21     # MinGW's make will run makefile commands using sh, even if make
22     #  was run from the Windows shell, if it finds sh in the path.
23     ESCAPE = "^"
24 } else {
25     QUOTE = "\'"
26     DOUBLE_ESCAPED_QUOTE = "\\\'"
27 }
28
29 DIRS = \
30     $$OUTPUT_DIR/include/JavaScriptCore \
31     $$OUTPUT_DIR/include/WebCore \
32     $$OUTPUT_DIR/include/WebKit2 \
33     $$OUTPUT_DIR/WebKit2/generated
34
35 for(DIR, DIRS) {
36     !exists($$DIR): system($$QMAKE_MKDIR $$DIR)
37 }
38
39 QMAKE_EXTRA_TARGETS += createdirs
40
41 SRC_ROOT_DIR = $$replace(PWD, /WebKit2, /)
42
43 messageheader_generator.commands = python $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-messages-header.py  $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebPage/WebPage.messages.in > $$OUTPUT_DIR/WebKit2/generated/WebPageMessages.h
44 messageheader_generator.depends  = $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-messages-header.py $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebPage/WebPage.messages.in
45 messageheader_generator.target   = $${OUTPUT_DIR}/WebKit2/generated/WebPageMessages.h
46 generated_files.depends          += messageheader_generator
47 QMAKE_EXTRA_TARGETS              += messageheader_generator
48
49 messagereceiver_generator.commands = python $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-message-receiver.py  $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebPage/WebPage.messages.in > $$OUTPUT_DIR/WebKit2/generated/WebPageMessageReceiver.cpp
50 messagereceiver_generator.depends  = $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-message-receiver.py $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebPage/WebPage.messages.in
51 messagereceiver_generator.target   = $${OUTPUT_DIR}/WebKit2/generated/WebPageMessageReceiver.cpp
52 generated_files.depends            += messagereceiver_generator
53 QMAKE_EXTRA_TARGETS                += messagereceiver_generator
54
55 processmessageheader_generator.commands = python $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-messages-header.py  $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebProcess.messages.in > $$OUTPUT_DIR/WebKit2/generated/WebProcessMessages.h
56 processmessageheader_generator.depends  = $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-messages-header.py $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebProcess.messages.in
57 processmessageheader_generator.target   = $${OUTPUT_DIR}/WebKit2/generated/WebProcessMessages.h
58 generated_files.depends                 += processmessageheader_generator
59 QMAKE_EXTRA_TARGETS                     += processmessageheader_generator
60
61 processmessagereceiver_generator.commands = python $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-message-receiver.py  $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebProcess.messages.in > $$OUTPUT_DIR/WebKit2/generated/WebProcessMessageReceiver.cpp
62 processmessagereceiver_generator.depends  = $${SRC_ROOT_DIR}/WebKit2/Scripts/generate-message-receiver.py $${SRC_ROOT_DIR}/WebKit2/WebProcess/WebProcess.messages.in
63 processmessagereceiver_generator.target   = $${OUTPUT_DIR}/WebKit2/generated/WebProcessMessageReceiver.cpp
64 generated_files.depends                   += processmessagereceiver_generator
65 QMAKE_EXTRA_TARGETS                       += processmessagereceiver_generator
66
67 fwheader_generator.commands = perl $${SRC_ROOT_DIR}/WebKit2/generate-forwarding-headers.pl $${OUTPUT_DIR}/include qt
68 fwheader_generator.depends  = $${SRC_ROOT_DIR}/WebKit2/generate-forwarding-headers.pl
69 generated_files.depends     += fwheader_generator
70 QMAKE_EXTRA_TARGETS         += fwheader_generator
71
72 for(HEADER, WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2) {
73     HEADER_NAME = $$basename(HEADER)
74     HEADER_PATH = $$HEADER
75     HEADER_TARGET = $$replace(HEADER_PATH, [^a-zA-Z0-9_], -)
76     HEADER_TARGET = "qtheader-$${HEADER_TARGET}"
77     DESTDIR = $$OUTPUT_DIR/include/"WebCore"
78
79     eval($${HEADER_TARGET}.target = $$DESTDIR/$$HEADER_NAME)
80     eval($${HEADER_TARGET}.depends = $$HEADER_PATH)
81     eval($${HEADER_TARGET}.commands = echo $${DOUBLE_ESCAPED_QUOTE}\$${LITERAL_HASH}include \\\"$$HEADER_PATH\\\"$${DOUBLE_ESCAPED_QUOTE} > $$eval($${HEADER_TARGET}.target))
82
83     QMAKE_EXTRA_TARGETS += $$HEADER_TARGET
84     generated_files.depends += $$eval($${HEADER_TARGET}.target)
85 }
86
87 QMAKE_EXTRA_TARGETS += generated_files