summaryrefslogtreecommitdiffstats
path: root/webkit/build
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 18:27:38 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 18:27:38 +0000
commit7bcfbb4296c517f0c6f27c23065065a0b5568b59 (patch)
treed0e804359a9bd9e0f697751d624be5d53215b6b4 /webkit/build
parentab5b9a361b7e6674c04071fa63dc2fce8491b196 (diff)
downloadchromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.zip
chromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.tar.gz
chromium_src-7bcfbb4296c517f0c6f27c23065065a0b5568b59.tar.bz2
Revert "Delete a bunch of deprecated and/or empty directores in src/webkit/."
This reverts commit r32340. TBR=japhet Review URL: http://codereview.chromium.org/402054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-xwebkit/build/JSConfig/create-config.sh103
-rw-r--r--webkit/build/JSConfig/prebuild.bat17
-rwxr-xr-xwebkit/build/JavaScriptCore/build-generated-files.sh47
-rw-r--r--webkit/build/JavaScriptCore/copy_files.bat22
-rw-r--r--webkit/build/JavaScriptCore/prebuild.bat32
-rw-r--r--webkit/build/JavaScriptCore/pthread.h94
-rw-r--r--webkit/build/JavaScriptCore/sched.h14
-rwxr-xr-xwebkit/build/KJSBindings/build-generated-files.sh44
-rw-r--r--webkit/build/KJSBindings/prebuild.bat11
-rwxr-xr-xwebkit/build/V8Bindings/build-generated-files.sh60
-rw-r--r--webkit/build/V8Bindings/copy_files.bat16
-rw-r--r--webkit/build/V8Bindings/prebuild.bat21
12 files changed, 481 insertions, 0 deletions
diff --git a/webkit/build/JSConfig/create-config.sh b/webkit/build/JSConfig/create-config.sh
new file mode 100755
index 0000000..8a673cc
--- /dev/null
+++ b/webkit/build/JSConfig/create-config.sh
@@ -0,0 +1,103 @@
+#!/usr/bin/bash -x
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# 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"
+WebCoreSrcDir="../../../third_party/WebKit/WebCore"
+if [[ "$2" = "kjs" ]]
+then
+ mkdir -p $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/APICast.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JavaScript.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSBase.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSContextRef.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSObjectRef.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSStringRef.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSStringRefCF.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSStringRefBSTR.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSValueRef.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JavaScriptCore.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/JSRetainPtr.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/OpaqueJSString.h $JSHeadersDir/JavaScriptCore
+ $CP $JavaScriptCoreSrcDir/API/WebKitAvailability.h $JSHeadersDir/JavaScriptCore
+else
+ $CP $WebCoreSrcDir/bridge/npapi.h $JSHeadersDir
+ $CP $WebCoreSrcDir/bridge/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
diff --git a/webkit/build/JSConfig/prebuild.bat b/webkit/build/JSConfig/prebuild.bat
new file mode 100644
index 0000000..29e68d3
--- /dev/null
+++ b/webkit/build/JSConfig/prebuild.bat
@@ -0,0 +1,17 @@
+@echo off
+
+setlocal
+set OUTDIR=%1
+set JSENG=%2
+set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
+set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
+
+:: Fix cp.exe on vista: without this flag, the files that it creates are not accessible.
+set CYGWIN=nontsec
+
+set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
+
+:: Ensure that the cygwin mount points are defined
+CALL %CYGWIN_ROOT%setup_mount.bat > NUL
+
+bash -x create-config.sh %OUTDIR% %JSENG%
diff --git a/webkit/build/JavaScriptCore/build-generated-files.sh b/webkit/build/JavaScriptCore/build-generated-files.sh
new file mode 100755
index 0000000..8644af3
--- /dev/null
+++ b/webkit/build/JavaScriptCore/build-generated-files.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/bash
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file just sets some paths then defers file creation to
+# DerivedSources.make.
+# This file is almost the same as the one found in webkit. The only
+# difference is that some paths have changed and we don't try to detect
+# the number of CPUs.
+
+NUMCPUS=1
+
+XSRCROOT="`pwd`/../.."
+XSRCROOT=`realpath "$XSRCROOT"`
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XSRCROOT=`cygpath -m -s "$XSRCROOT"`
+XSRCROOT=`cygpath -u "$XSRCROOT"`
+export XSRCROOT
+export SOURCE_ROOT=$XSRCROOT
+
+XDSTROOT="$1"
+export XDSTROOT
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XDSTROOT=`cygpath -m -s "$XDSTROOT"`
+XDSTROOT=`cygpath -u "$XDSTROOT"`
+export XDSTROOT
+
+SDKROOT="$2"
+export SDKROOT
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+SDKROOT=`cygpath -m -s "$SDKROOT"`
+SDKROOT=`cygpath -u "$SDKROOT"`
+export SDKROOT
+
+export BUILT_PRODUCTS_DIR="$XDSTROOT"
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
+
+export JavaScriptCore="${XSRCROOT}/../third_party/WebKit/JavaScriptCore"
+export DFTABLES_EXTENSION=".exe"
+make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
diff --git a/webkit/build/JavaScriptCore/copy_files.bat b/webkit/build/JavaScriptCore/copy_files.bat
new file mode 100644
index 0000000..431032b
--- /dev/null
+++ b/webkit/build/JavaScriptCore/copy_files.bat
@@ -0,0 +1,22 @@
+@echo off
+
+set DIR=%1
+set JAVASCRIPTCORE_DIR="..\..\..\third_party\WebKit\JavaScriptCore"
+setlocal
+
+mkDIR 2>NUL %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\APICast.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JavaScript.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSBase.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSContextRef.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSObjectRef.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSStringRef.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSStringRefCF.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSStringRefBSTR.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSValueRef.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JavaScriptCore.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\JSRetainPtr.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\OpaqueJSString.h" %DIR%
+xcopy /y /d "%JAVASCRIPTCORE_DIR%\API\WebKitAvailability.h" %DIR%
+
+endlocal
diff --git a/webkit/build/JavaScriptCore/prebuild.bat b/webkit/build/JavaScriptCore/prebuild.bat
new file mode 100644
index 0000000..fd7b878
--- /dev/null
+++ b/webkit/build/JavaScriptCore/prebuild.bat
@@ -0,0 +1,32 @@
+REM @echo off
+
+setlocal
+set IntDir=%1
+set OutDir=%2
+set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
+set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
+
+set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
+
+:: Ensure that the cygwin mount points are defined
+CALL %CYGWIN_ROOT%setup_mount.bat > NUL
+
+:: Fix tempfile() on vista: without this flag, the files that it creates are not accessible.
+set CYGWIN=nontsec
+
+:: Help dftables script to find a usable temporary directory. For an unknown
+:: reason, /tmp is not defined on cygwin and this script looks at TMPDIR
+:: environment variable, which is usually not defined on Windows either.
+if "%TMPDIR%" == "" (
+ REM It fails in even stranger way if the TEMP folder is not owned by the
+ REM current user, so create a folder to make sure we are the owner.
+ set TMPDIR=%TEMP%\javascriptcore_pcre
+ mkdir %TEMP%\javascriptcore_pcre
+ bash build-generated-files.sh "%IntDir%" "..\..\..\third_party\WebKit"
+ rd /q /s %TEMP%\javascriptcore_pcre
+) else (
+ bash build-generated-files.sh "%IntDir%" "..\..\..\third_party\WebKit"
+)
+
+call copy_files.bat %IntDir%\JavaScriptCore
+endlocal
diff --git a/webkit/build/JavaScriptCore/pthread.h b/webkit/build/JavaScriptCore/pthread.h
new file mode 100644
index 0000000..3259fe8
--- /dev/null
+++ b/webkit/build/JavaScriptCore/pthread.h
@@ -0,0 +1,94 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__
+#define CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__
+
+#include <errno.h>
+#include "wtf/Assertions.h"
+
+// Dummy implementations of various pthread APIs
+
+// ----------------------------------------------------------------------------
+// pthread_t
+
+typedef int pthread_t;
+
+inline pthread_t pthread_self() {
+ return 0;
+}
+inline int pthread_equal(pthread_t a, pthread_t b) {
+ return a == b;
+}
+inline int pthread_create(pthread_t* thread, void*, void* (*)(void*), void*) {
+ ASSERT_NOT_REACHED();
+ return EINVAL;
+}
+inline int pthread_join(pthread_t thread, void **) {
+ ASSERT_NOT_REACHED();
+ return EINVAL;
+}
+
+// ----------------------------------------------------------------------------
+// pthread_mutex_t
+
+typedef int pthread_mutex_t;
+
+inline int pthread_mutex_init(pthread_mutex_t* mutex, const void*) {
+ return 0;
+}
+inline int pthread_mutex_destroy(pthread_mutex_t* mutex) {
+ return 0;
+}
+inline int pthread_mutex_lock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+inline int pthread_mutex_trylock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+inline int pthread_mutex_unlock(pthread_mutex_t* mutex) {
+ return 0;
+}
+
+#define PTHREAD_MUTEX_INITIALIZER 0
+
+//
+// pthread_cond_t
+typedef int pthread_cond_t;
+
+inline int pthread_cond_init(pthread_cond_t* cond, const void*) {
+ return 0;
+}
+inline int pthread_cond_destroy(pthread_cond_t* cond) {
+ return 0;
+}
+
+inline int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *) {
+ return 0;
+}
+inline int pthread_cond_signal(pthread_cond_t *) {
+ return 0;
+}
+inline int pthread_cond_broadcast(pthread_cond_t *) {
+ return 0;
+}
+
+// ----------------------------------------------------------------------------
+// pthread_key_t
+
+typedef int pthread_key_t;
+
+void pthread_setspecific(pthread_key_t key, void* value) {
+ TlsSetValue(key, value);
+}
+
+void pthread_key_create(pthread_key_t* key, void* destructor) {
+ // TODO(mbelshe): hook up the per-thread destructor.
+ *key = TlsAlloc();
+}
+
+
+#endif // CHROME_WEBKIT_BUILD_JAVASCRIPTCORE_PTHREAD_H__
diff --git a/webkit/build/JavaScriptCore/sched.h b/webkit/build/JavaScriptCore/sched.h
new file mode 100644
index 0000000..276e87a
--- /dev/null
+++ b/webkit/build/JavaScriptCore/sched.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_BUILD_JAVASCRIPTCORE_SCHED_H__
+#define WEBKIT_BUILD_JAVASCRIPTCORE_SCHED_H__
+
+// Dummy implementation of sched.h so WTF will compile.
+
+inline int sched_yield() {
+ return 0;
+}
+
+#endif // WEBKIT_BUILD_JAVASCRIPTCORE_SCHED_H__
diff --git a/webkit/build/KJSBindings/build-generated-files.sh b/webkit/build/KJSBindings/build-generated-files.sh
new file mode 100755
index 0000000..6095885
--- /dev/null
+++ b/webkit/build/KJSBindings/build-generated-files.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/bash
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+XSRCROOT="$1"
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XSRCROOT=`cygpath -m -s "$XSRCROOT"`
+XSRCROOT=`cygpath -u "$XSRCROOT"`
+export XSRCROOT
+export SOURCE_ROOT=$XSRCROOT
+
+PORTROOT="$2"
+PORTROOT=`cygpath -m -s "$PORTROOT"`
+PORTROOT=`cygpath -u "$PORTROOT"`
+export PORTROOT=`realpath "$PORTROOT"`
+
+XDSTROOT="$3"
+export XDSTROOT
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XDSTROOT=`cygpath -m -s "$XDSTROOT"`
+XDSTROOT=`cygpath -u "$XDSTROOT"`
+export XDSTROOT
+
+export BUILT_PRODUCTS_DIR="$4"
+export CREATE_HASH_TABLE="$XSRCROOT/../JavaScriptCore/create_hash_table"
+
+DerivedSourcesDir="${BUILT_PRODUCTS_DIR}\DerivedSources"
+echo "$DerivedSourcesDir"
+mkdir -p "$DerivedSourcesDir"
+cd "$DerivedSourcesDir"
+
+export WebCore="${XSRCROOT}"
+export ENCODINGS_FILE="${WebCore}/platform/win/win-encodings.txt";
+export ENCODINGS_PREFIX=""
+
+# To see what FEATURE_DEFINES Apple uses, look at:
+# webkit/third_party/WebCore/Configurations/WebCore.xcconfig
+export FEATURE_DEFINES="ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_XPATH ENABLE_XSLT"
+
+make -f "$WebCore/DerivedSources.make" -j 2 || exit 1
diff --git a/webkit/build/KJSBindings/prebuild.bat b/webkit/build/KJSBindings/prebuild.bat
new file mode 100644
index 0000000..411ef55
--- /dev/null
+++ b/webkit/build/KJSBindings/prebuild.bat
@@ -0,0 +1,11 @@
+@echo off
+
+setlocal
+set OUTDIR=%1
+set INTDIR=%2
+set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
+set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
+
+set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
+
+bash build-generated-files.sh ..\..\..\third_party\WebKit\WebCore ..\..\port "%OUTDIR%" "%INTDIR%"
diff --git a/webkit/build/V8Bindings/build-generated-files.sh b/webkit/build/V8Bindings/build-generated-files.sh
new file mode 100755
index 0000000..82a9945
--- /dev/null
+++ b/webkit/build/V8Bindings/build-generated-files.sh
@@ -0,0 +1,60 @@
+#!/usr/bin/bash -x
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This build script is similar to the one found in webkit.
+# We've temporarily modified it to support conditional compiling of
+# the V8 DerivedSources. When we build our DerivedSources, we build
+# partly from our port directory, and partly from the webkit directory;
+# chosing files from our port area only if they contain changes from
+# the original.
+#
+
+XSRCROOT="$1"
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XSRCROOT=`cygpath -m -s "$XSRCROOT"`
+XSRCROOT=`cygpath -u "$XSRCROOT"`
+export XSRCROOT
+export SOURCE_ROOT="$XSRCROOT"
+
+PORTROOT="$2"
+PORTROOT=`cygpath -m -s "$PORTROOT"`
+PORTROOT=`cygpath -u "$PORTROOT"`
+export PORTROOT=`realpath "$PORTROOT"`
+
+XDSTROOT="$3"
+export XDSTROOT
+# Do a little dance to get the path into 8.3 form to make it safe for gnu make
+# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173
+XDSTROOT=`cygpath -m -s "$XDSTROOT"`
+XDSTROOT=`cygpath -u "$XDSTROOT"`
+export XDSTROOT
+
+export BUILT_PRODUCTS_DIR="$4"
+export CREATE_HASH_TABLE="$XSRCROOT/../JavaScriptCore/create_hash_table"
+
+DerivedSourcesDir="${BUILT_PRODUCTS_DIR}\DerivedSources"
+echo "$DerivedSourcesDir"
+mkdir -p "$DerivedSourcesDir"
+cd "$DerivedSourcesDir"
+
+export WebCore="${XSRCROOT}"
+export ENCODINGS_FILE="${WebCore}/platform/win/win-encodings.txt";
+export ENCODINGS_PREFIX=""
+
+# To see what FEATURE_DEFINES Apple uses, look at:
+# webkit/third_party/WebCore/Configurations/WebCore.xcconfig
+export FEATURE_DEFINES="ENABLE_DATABASE ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_WORKERS ENABLE_OFFLINE_WEB_APPLICATIONS ENABLE_CHANNEL_MESSAGING ENABLE_XPATH ENABLE_XSLT"
+
+# Adjust the number of jobs spawned according to the CPU count.
+if [ -z "$NUMBER_OF_PROCESSORS" ]; then
+ echo "WARNING: NUMBER_OF_PROCESSORS environment variable not defined; assuming 2"
+fi
+JOBS=$((${NUMBER_OF_PROCESSORS:-2} + 1))
+
+echo Building DerivedSources ${PORTROOT}...
+# Use silent flag.
+make -s -f "${PORTROOT}/DerivedSources.make" -j $JOBS || exit 1
diff --git a/webkit/build/V8Bindings/copy_files.bat b/webkit/build/V8Bindings/copy_files.bat
new file mode 100644
index 0000000..effcfbb
--- /dev/null
+++ b/webkit/build/V8Bindings/copy_files.bat
@@ -0,0 +1,16 @@
+@echo off
+
+::
+:: Some of the files used by the KJS bindings are not KJS specific and
+:: can therefore be used directly by the V8 bindings. This script
+:: copies those filed from the third_party KJS bindings directory
+:: to the directory given as argument to the script.
+::
+set DIR=%1
+set KJS_BINDINGS_DIR="..\..\..\third_party\WebKit\WebCore\bindings\js"
+setlocal
+
+mkdir 2>NUL %DIR%
+
+endlocal
+
diff --git a/webkit/build/V8Bindings/prebuild.bat b/webkit/build/V8Bindings/prebuild.bat
new file mode 100644
index 0000000..de43b15
--- /dev/null
+++ b/webkit/build/V8Bindings/prebuild.bat
@@ -0,0 +1,21 @@
+@echo off
+
+setlocal
+set OUTDIR=%1
+set INTDIR=%2
+set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
+set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
+
+set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
+
+:: Ensure that the cygwin mount points are defined
+CALL %CYGWIN_ROOT%setup_mount.bat > NUL
+
+:: Fix file access on vista: without this flag, the files may not be accessible.
+set CYGWIN=nontsec
+
+:: Copy files that the V8 bindings share with the KJS bindings.
+call copy_files.bat %IntDir%\SharedSources
+
+:: Build the generated files from IDL files.
+bash build-generated-files.sh ..\..\..\third_party\WebKit\WebCore ..\..\port "%OUTDIR%" "%INTDIR%"