blob: e79d2a1affce1abcb3a01d9fc7782e8cde9ce30d (
plain)
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
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
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
|
#!/usr/bin/bash -x
#
# In order to build KJS or V8 versions of Chrome, we need to create
# a custom configuration header. This script creates it.
#
# Input
# create-config.sh <OutputDir> <kjs|v8>
#
# Output
# in the $Output\WebCore directory, creates a config.h
# custom to the desired build setup
#
set -ex
#
# Step 1: Create the webkit config.h which is appropriate for our
# JavaScript engine.
#
if [[ "${OS}" != "Windows_NT" ]]
then
WebCoreObjDir="$1/WebCore"
JSHeadersDir="$1/WebCore/JavaScriptHeaders"
CP="cp -p"
else
WebCoreObjDir="$1\obj\WebCore"
JSHeadersDir="$1\obj\WebCore\JavaScriptHeaders"
CP="cp"
fi
mkdir -p "$WebCoreObjDir"
rm -f $WebCoreObjDir/definitions.h 2> /dev/null
if [[ "$2" = "kjs" ]]
then
SubDir=/kjs
cat > $WebCoreObjDir/definitions.h << -=EOF=-
#define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
#define WTF_USE_NPOBJECT 1
-=EOF=-
else
SubDir=/v8
cat > $WebCoreObjDir/definitions.h << -=EOF=-
#define WTF_USE_V8_BINDING 1
#define WTF_USE_NPOBJECT 1
-=EOF=-
fi
if [[ "${OS}" = "Windows_NT" ]]
then
SubDir=
fi
mkdir -p "${WebCoreObjDir}${SubDir}"
pwd
cat ../../config.h.in $WebCoreObjDir/definitions.h > $WebCoreObjDir$SubDir/config.h.new
if [[ "${OS}" = "Windows_NT" ]] || \
! diff -q $WebCoreObjDir$SubDir/config.h.new $WebCoreObjDir$SubDir/config.h >& /dev/null
then
mv $WebCoreObjDir$SubDir/config.h.new $WebCoreObjDir$SubDir/config.h
else
rm $WebCoreObjDir$SubDir/config.h.new
fi
rm -f "${WebCoreObjDir}/definitions.h"
#
# Step 2: Populate the JavaScriptHeaders based on the selected
# JavaScript engine.
#
JSHeadersDir="${JSHeadersDir}${SubDir}"
mkdir -p $JSHeadersDir
JavaScriptCoreSrcDir="../../../third_party/WebKit/JavaScriptCore"
if [[ "$2" = "kjs" ]]
then
mkdir -p $JSHeadersDir/JavaScriptCore
# Note, we'd like to copy dir/*.h here, but the directories
# are poluted with files like Node.h. Copying the Node.h
# from these directories is fatal. So, we have to hand copy just
# the right list of files. Hooray!
$CP $JavaScriptCoreSrcDir/API/APICast.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/API/JSBase.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/API/JSValueRef.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/API/JSObjectRef.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/API/JSContextRef.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/API/JSStringRef.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/bindings/npapi.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/npruntime.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/npruntime_internal.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/npruntime_impl.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/npruntime_priv.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/runtime.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/bindings/NP_jsobject.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/bindings/runtime_object.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/bindings/runtime_root.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/JSImmediate.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/JSLock.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/JSType.h $JSHeadersDir/JavaScriptCore
$CP ../../../webkit/pending/kjs/collector.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/interpreter.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/protect.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/ustring.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/kjs/value.h $JSHeadersDir/JavaScriptCore
$CP $JavaScriptCoreSrcDir/wtf/HashCountedSet.h $JSHeadersDir/JavaScriptCore
else
$CP $JavaScriptCoreSrcDir/bindings/npapi.h $JSHeadersDir
$CP $JavaScriptCoreSrcDir/bindings/npruntime.h $JSHeadersDir
$CP ../../../webkit/port/bindings/v8/npruntime_priv.h $JSHeadersDir
fi
if [[ "${OS}" = "Windows_NT" ]]
then
$CP $JavaScriptCoreSrcDir/os-win32/stdint.h $JSHeadersDir
fi
|