Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
[WebKit-https.git] / JavaScriptCore / JavaScriptCore.vcproj / JavaScriptCore / build-generated-files.sh
index 15c184d..85c3152 100755 (executable)
@@ -1,60 +1,57 @@
-#!/usr/bin/bash\r
-\r
-# Convert the DOS WebKitOutputDir variable to a unix path.\r
-WebKitUnixDir=`cygpath -a -u "$2"`\r
-\r
-# Set up the directory that will hold all our generated files.\r
-DerivedSourcesDir="$WebKitUnixDir/JavaScriptCore.intermediate/$1/JavaScriptCore.intermediate/DerivedSources"\r
-mkdir -p "$DerivedSourcesDir"\r
-\r
-# Invoke the create_hash_table perl script to create all of our lookup tables\r
-\r
-if [ ../../kjs/array_object.cpp -nt "$DerivedSourcesDir/array_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/array_object.cpp > "$DerivedSourcesDir/array_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/bool_object.cpp -nt "$DerivedSourcesDir/bool_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/bool_object.cpp > "$DerivedSourcesDir/bool_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/date_object.cpp -nt "$DerivedSourcesDir/date_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/date_object.cpp > "$DerivedSourcesDir/date_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/error_object.cpp -nt "$DerivedSourcesDir/error_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/error_object.cpp > "$DerivedSourcesDir/error_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/function_object.cpp -nt "$DerivedSourcesDir/function_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/function_object.cpp > "$DerivedSourcesDir/function_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/math_object.cpp -nt "$DerivedSourcesDir/math_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/math_object.cpp > "$DerivedSourcesDir/math_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/number_object.cpp -nt "$DerivedSourcesDir/number_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/number_object.cpp > "$DerivedSourcesDir/number_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/object_object.cpp -nt "$DerivedSourcesDir/object_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/object_object.cpp > "$DerivedSourcesDir/object_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/regexp_object.cpp -nt "$DerivedSourcesDir/regexp_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/regexp_object.cpp > "$DerivedSourcesDir/regexp_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/string_object.cpp -nt "$DerivedSourcesDir/string_object.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/string_object.cpp > "$DerivedSourcesDir/string_object.lut.h" -i\r
-fi\r
-\r
-if [ ../../kjs/string_object.cpp -nt "$DerivedSourcesDir/lexer.lut.h" ]; then\r
-  ../../kjs/create_hash_table ../../kjs/keywords.table > "$DerivedSourcesDir/lexer.lut.h" -i\r
-fi\r
-\r
-# Generate the grammar using bison\r
-if [ ../../kjs/grammar.y -nt "$DerivedSourcesDir/grammar.cpp" ]; then\r
-  bison -d -p kjsyy ../../kjs/grammar.y -o "$DerivedSourcesDir/grammar.cpp"\r
-  mv "$DerivedSourcesDir/grammar.hpp" "$DerivedSourcesDir/grammar.h"\r
-fi\r
+#!/usr/bin/bash
+
+# Determine if we have QuartzCore so we can turn on
+QUARTZCORE_H_PATH=$(cygpath -u "${WEBKITLIBRARIESDIR}/include/QuartzCore/QuartzCore.h")
+QUARTZCOREPRESENT_H_PATH=$(cygpath -u "${WEBKITOUTPUTDIR}/include/private/QuartzCorePresent.h")
+if test \( ! -f "${QUARTZCOREPRESENT_H_PATH}" \) -o \( -f "${QUARTZCORE_H_PATH}" -a \( "${QUARTZCORE_H_PATH}" -nt "${QUARTZCOREPRESENT_H_PATH}" \) \)
+then
+    mkdir -p "$(dirname "${QUARTZCOREPRESENT_H_PATH}")"
+    test ! -f "${QUARTZCORE_H_PATH}"
+    echo "#define QUARTZCORE_PRESENT $?" > "${QUARTZCOREPRESENT_H_PATH}"
+fi
+
+# Determine whether we have the versioned ICU 4.0 or the unversioned ICU 4.4
+UNVERSIONED_ICU_LIB_PATH=$(cygpath -u "${WEBKITLIBRARIESDIR}/lib/libicuuc.lib")
+ICUVERSION_H_PATH=$(cygpath -u "${WEBKITOUTPUTDIR}/include/private/ICUVersion.h")
+if test \( ! -f "${ICUVERSION_H_PATH}" \) -o \( -f "${UNVERSIONED_ICU_LIB_PATH}" -a \( "${UNVERSIONED_ICU_LIB_PATH}" -nt "${ICUVERSION_H_PATH}" \) \)
+then
+    mkdir -p "$(dirname "${ICUVERSION_H_PATH}")"
+    test ! -f "${UNVERSIONED_ICU_LIB_PATH}"
+    echo "#define U_DISABLE_RENAMING $?" > "${ICUVERSION_H_PATH}"
+fi
+
+NUMCPUS=`../../../WebKitTools/Scripts/num-cpus`
+
+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/obj/JavaScriptCore"
+
+mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/docs"
+cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
+
+export JavaScriptCore="${XSRCROOT}"
+export DFTABLES_EXTENSION=".exe"
+make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1