+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
+ * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
+ * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters:
+ * JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd:
+ * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make:
+ * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
+ * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh.
+ * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh: Removed.
+ * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make:
+ * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
+ * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh.
+ * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Removed.
+ * JavaScriptCore.vcxproj/build-generated-files.pl: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh.
+ * JavaScriptCore.vcxproj/build-generated-files.sh: Removed.
+ * JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd:
+ * JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd:
+ * JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd:
+
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove use of 'grep' in build steps
all:
touch "%ConfigurationBuildDir%\buildfailed"
- bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
+ perl build-generated-files.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
copy-files.cmd
-del "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdbool.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdint.h"
</ItemGroup>
<ItemGroup>
<None Include="..\DerivedSources.make" />
- <None Include="build-generated-files.sh" />
+ <None Include="build-generated-files.pl" />
<None Include="copy-files.cmd" />
<None Include="JavaScriptCoreGenerated.make" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <None Include="build-generated-files.sh" />
<None Include="JavaScriptCoreGenerated.make" />
<None Include="..\DerivedSources.make" />
<None Include="copy-files.cmd" />
+ <None Include="build-generated-files.pl" />
</ItemGroup>
</Project>
\ No newline at end of file
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
all:
touch "%ConfigurationBuildDir%\buildfailed"
- bash build-LLIntAssembly.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%"
+ perl build-LLIntAssembly.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%"
-del "%ConfigurationBuildDir%\buildfailed"
clean:
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
- <None Include="build-LLIntAssembly.sh" />
+ <None Include="build-LLIntAssembly.pl" />
<None Include="LLIntAssembly.make" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl -w
+
+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
+
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->catdir($PWD, '..', '..', '..'));
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SRCROOT'} = $XSRCROOT;
+
+# Make sure we don't have any leading or trailing quotes
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
+my $XDSTROOT = Cwd::realpath($ARGV[0]);
+$ENV{'XDSTROOT'} = $XDSTROOT;
+
+my $BUILD_PRODUCTS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[3]");
+$ENV{'BUILT_PRODUCTS_DIR'} = $BUILD_PRODUCTS_DIR;
+
+my $DERIVED_SOURCES_DIR = File::Spec->catdir($BUILD_PRODUCTS_DIR, 'JavaScriptCore', 'DerivedSources');
+unless (-d $DERIVED_SOURCES_DIR) {
+ make_path($DERIVED_SOURCES_DIR) or die "Couldn't create $DERIVED_SOURCES_DIR: $!";
+}
+
+chdir $DERIVED_SOURCES_DIR or die "Couldn't change directory to $DERIVED_SOURCES_DIR: $!";
+
+# Create a dummy asm file in case we are using the C backend
+# This is needed since LowLevelInterpreterWin.asm is part of the project.
+my $LowLevelInterpreterWin = File::Spec->catfile($DERIVED_SOURCES_DIR, 'LowLevelInterpreterWin.asm');
+
+open(OUTPUTFILENAME, '>', $LowLevelInterpreterWin) or die "Couldn't open $LowLevelInterpreterWin to write: $!";
+print OUTPUTFILENAME "END\n";
+close(OUTPUTFILENAME);
+
+# If you want to enable the LLINT C loop, set OUTPUTFILENAME to "LLIntAssembly.h"
+my $OUTPUTFILENAME = File::Spec->catfile($DERIVED_SOURCES_DIR, 'LowLevelInterpreterWin.asm');
+
+my $offlineAsm = File::Spec->catfile($XSRCROOT, 'offlineasm', 'asm.rb');
+my $lowLevelInterpreter = File::Spec->catfile($XSRCROOT, 'llint', 'LowLevelInterpreter.asm');
+my $offsetsExtractor = File::Spec->catfile($BUILD_PRODUCTS_DIR, 'LLIntOffsetsExtractor', "LLIntOffsetsExtractor$ARGV[2].exe");
+system('/usr/bin/env', 'ruby', $offlineAsm, '-I.', $lowLevelInterpreter, $offsetsExtractor, $OUTPUTFILENAME) and die "Failed to generate $OUTPUTFILENAME: $!";
+++ /dev/null
-#!/usr/bin/bash
-
-SRCROOT="`pwd`/../../.."
-SRCROOT=`realpath "$SRCROOT"`
-# 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
-SRCROOT=`cygpath -m -s "$SRCROOT"`
-SRCROOT=`cygpath -u "$SRCROOT"`
-export SRCROOT
-
-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
-
-export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${4}"
-
-cd "${BUILT_PRODUCTS_DIR}/JavaScriptCore/DerivedSources"
-
-# Create a dummy asm file in case we are using the C backend
-# This is needed since LowLevelInterpreterWin.asm is part of the project.
-
-printf "END" > LowLevelInterpreterWin.asm
-
-# If you want to enable the LLINT C loop, set OUTPUTFILENAME to "LLIntAssembly.h"
-
-OUTPUTFILENAME="LowLevelInterpreterWin.asm"
-
-/usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "-I." "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor${3}.exe" "${OUTPUTFILENAME}" || exit 1
all:
touch "%ConfigurationBuildDir%\buildfailed"
- bash build-LLIntDesiredOffsets.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
+ perl build-LLIntDesiredOffsets.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
-del "%ConfigurationBuildDir%\buildfailed"
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
- <None Include="build-LLIntDesiredOffsets.sh" />
+ <None Include="build-LLIntDesiredOffsets.pl" />
<None Include="LLIntDesiredOffsets.make" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl -w
+
+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
+
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->catdir($PWD, '..', '..', '..'));
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SRCROOT'} = $XSRCROOT;
+
+# Make sure we don't have any leading or trailing quotes
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
+my $XDSTROOT = Cwd::realpath($ARGV[0]);
+$ENV{'XDSTROOT'} = $XDSTROOT;
+
+my $BUILD_PRODUCTS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[2]", 'JavaScriptCore', 'DerivedSources');
+$ENV{'BUILT_PRODUCTS_DIR'} = $BUILD_PRODUCTS_DIR;
+
+##############################################################################
+# Step 1: Generate LLIntDesiredOffsets.h
+unless (-d $BUILD_PRODUCTS_DIR) {
+ make_path($BUILD_PRODUCTS_DIR) or die "Couldn't create $BUILD_PRODUCTS_DIR: $!";
+}
+
+my $generateOffsetExtractor = File::Spec->catfile($XSRCROOT, 'offlineasm', 'generate_offset_extractor.rb');
+my $lowLevelInterpreter = File::Spec->catfile($XSRCROOT, 'llint', 'LowLevelInterpreter.asm');
+my $OUTPUTFILENAME = File::Spec->catfile($BUILD_PRODUCTS_DIR, 'LLIntDesiredOffsets.h');
+system('/usr/bin/env', 'ruby', $generateOffsetExtractor, "-I$BUILD_PRODUCTS_DIR", $lowLevelInterpreter, $OUTPUTFILENAME) and die "Failed to generate $OUTPUTFILENAME: $!";
+++ /dev/null
-#!/usr/bin/bash
-
-SRCROOT="`pwd`/../../.."
-SRCROOT=`realpath "$SRCROOT"`
-# 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
-SRCROOT=`cygpath -m -s "$SRCROOT"`
-SRCROOT=`cygpath -u "$SRCROOT"`
-export SRCROOT
-
-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
-
-export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${3}/JavaScriptCore/DerivedSources"
-
-##############################################################################
-# Step 1: Generate LLIntDesiredOffsets.h
-mkdir -p "${BUILT_PRODUCTS_DIR}"
-
-/usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "-I${BUILT_PRODUCTS_DIR}" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h"
-#!/usr/bin/bash
+#!/usr/bin/perl -w
-# Copyright (C) 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2014 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-NUMCPUPATH="../../Tools/Scripts/num-cpus"
-if [ -x $NUMCPUPATH ]; then
- NUMCPUS=`$NUMCPUPATH`
-else
- NUMCPUS=8
-fi
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
-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
+# Not all build environments have the webkitdirs module installed.
+my $NUMCPUS = 2;
+eval "use webkitdirs";
+unless ($@) {
+ $NUMCPUS = numberOfCPUs();
+}
-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
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->updir);
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SOURCE_ROOT'} = $XSRCROOT;
-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
+# Make sure we don't have any leading or trailing quotes
+for (@ARGV) {
+ s/^\"//;
+ s/\"$//;
+}
-export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${4}/WebCore"
+my $XDSTROOT = $ARGV[0];
+$ENV{'XDSTROOT'} = $XDSTROOT;
-mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
-cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
+my $SDKROOT = $ARGV[1];
+$ENV{'SDKROOT'} = $SDKROOT;
-export WebCore="${XSRCROOT}"
-export FEATURE_DEFINES=`$SDKROOT/tools/scripts/feature-defines.sh $SDKROOT $3`
-export InspectorScripts="$XDSTROOT/include/private/JavaScriptCore"
-export WebReplayScripts="$XDSTROOT/include/private/JavaScriptCore"
+my $BUILD_PRODUCTS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[2]", 'JavaScriptCore');
+$ENV{'BUILT_PRODUCTS_DIR'} = $BUILD_PRODUCTS_DIR;
-make -f "$WebCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
+my $DERIVED_SOURCES_DIR = File::Spec->catdir($BUILD_PRODUCTS_DIR, 'DerivedSources');
+unless (-d $DERIVED_SOURCES_DIR) {
+ make_path($DERIVED_SOURCES_DIR) or die "Couldn't create $DERIVED_SOURCES_DIR: $!";
+}
+
+chdir $DERIVED_SOURCES_DIR or die "Couldn't change directory to $DERIVED_SOURCES_DIR: $!";
+
+$ENV{'JavaScriptCore'} = $XSRCROOT;
+$ENV{'DFTABLES_EXTENSION'} = '.exe';
+
+my $DERIVED_SOURCES_MAKEFILE = File::Spec->catfile($XSRCROOT, 'DerivedSources.make');
+
+system('/usr/bin/make', '-f', $DERIVED_SOURCES_MAKEFILE, '-j', $NUMCPUS) and die "Failed to build $DERIVED_SOURCES_MAKEFILE: $!";
+++ /dev/null
-#!/usr/bin/bash
-
-NUMCPUPATH="../../Tools/Scripts/num-cpus"
-if [ -x $NUMCPUPATH ]; then
- NUMCPUS=`$NUMCPUPATH`
-else
- NUMCPUS=8
-fi
-
-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 "$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${3}/JavaScriptCore"
-
-mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
-cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
-
-export JavaScriptCore="${XSRCROOT}"
-export DFTABLES_EXTENSION=".exe"
-make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * WTF.vcxproj/WTFGenerated.make:
+ * WTF.vcxproj/WTFGenerated.vcxproj:
+ * WTF.vcxproj/WTFGenerated.vcxproj.filters:
+ * WTF.vcxproj/WTFPreBuild.cmd:
+ * WTF.vcxproj/build-generated-files.pl: Copied from Source/WTF/WTF.vcxproj/build-generated-files.sh.
+ * WTF.vcxproj/build-generated-files.sh: Removed.
+
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove use of 'grep' in build steps
all: WTFHeaderDetection.h
touch "%ConfigurationBuildDir%\buildfailed"
- bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%"
+ perl build-generated-files.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%"
!IF "$(OFFICIAL_BUILD)"!="1"
- bash -c "/usr/bin/python work-around-vs-dependency-tracking-bugs.py"
+ python work-around-vs-dependency-tracking-bugs.py
!ENDIF
copy-files.cmd
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
- <None Include="build-generated-files.sh" />
+ <None Include="build-generated-files.pl" />
<None Include="copy-files.cmd" />
<None Include="work-around-vs-dependency-tracking-bugs.py" />
<None Include="WTFGenerated.make" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <None Include="build-generated-files.sh" />
<None Include="copy-files.cmd" />
<None Include="work-around-vs-dependency-tracking-bugs.py" />
<None Include="WTFGenerated.make" />
+ <None Include="build-generated-files.pl" />
</ItemGroup>
</Project>
\ No newline at end of file
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
-#!/usr/bin/bash
+#!/usr/bin/perl -w
-# Copyright (C) 2014 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-XSRCROOT="`pwd`/.."
-XSRCROOT=`realpath "$XSRCROOT"`
-export XSRCROOT
-export SRCROOT=$XSRCROOT
+use strict;
+use File::Path qw(make_path);
+use File::Spec;
+use File::stat;
-XDSTROOT="$1"
-export XDSTROOT
+# Make sure we don't have any leading or trailing quotes
+for (@ARGV) {
+ s/^\"//;
+ s/\"$//;
+}
-export TARGET_BUILD_DIR="$XDSTROOT/bin${4}/WebKit.resources"
-export JAVASCRIPTCORE_PRIVATE_HEADERS_DIR="$XDSTROOT/obj${4}/JavaScriptCore/DerivedSources"
-export WEBCORE_PRIVATE_HEADERS_DIR="$XDSTROOT/obj${4}/WebCore/DerivedSources"
-export DERIVED_SOURCES_DIR="$XDSTROOT/obj${4}/WebInspectorUI/DerivedSources"
+# Determine whether we have the versioned ICU 4.0 or the unversioned ICU 4.4
+my $UNVERSIONED_ICU_LIB_PATH = File::Spec->catfile($ARGV[1], "lib$ARGV[3]", "libicuuc$ARGV[2].lib");
+my $PRIVATE_INCLUDE = File::Spec->catdir($ARGV[0], 'include', 'private');
+my $ICUVERSION_H_PATH = File::Spec->catfile($PRIVATE_INCLUDE, 'ICUVersion.h');
+if ((! -f $ICUVERSION_H_PATH) or (-f $UNVERSIONED_ICU_LIB_PATH and (stat($UNVERSIONED_ICU_LIB_PATH)->mtime > stat($ICUVERSION_H_PATH)->mtime))) {
+ unless (-d $PRIVATE_INCLUDE) {
+ make_path($PRIVATE_INCLUDE) or die "Couldn't create $PRIVATE_INCLUDE: $!";
+ }
-export UNLOCALIZED_RESOURCES_FOLDER_PATH="WebInspectorUI"
-
-if [[ ${TARGET_BUILD_DIR} =~ "Release" ]] || [[ ${TARGET_BUILD_DIR} =~ "Production" ]]; then
- export COMBINE_INSPECTOR_RESOURCES="YES";
-fi
-
-/usr/bin/perl "${SRCROOT}/Scripts/copy-user-interface-resources.pl"
+ my $disableRenaming = (-f $UNVERSIONED_ICU_LIB_PATH) ? 1 : 0;
+ open(ICU_VERSION_FILE, '>', $ICUVERSION_H_PATH) or die "Unable to open $ICUVERSION_H_PATH: $!";
+ print ICU_VERSION_FILE "#define U_DISABLE_RENAMING $disableRenaming\n";
+ close(ICU_VERSION_FILE);
+}
+++ /dev/null
-#!/usr/bin/bash
-
-# Determine whether we have the versioned ICU 4.0 or the unversioned ICU 4.4
-UNVERSIONED_ICU_LIB_PATH=$(cygpath -u "${2}/lib${4}/libicuuc${3}.lib")
-ICUVERSION_H_PATH=$(cygpath -u "${1}/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}")"
- echo "Checking ${UNVERSIONED_ICU_LIB_PATH}"
- test ! -f "${UNVERSIONED_ICU_LIB_PATH}"
- echo "#define U_DISABLE_RENAMING $?" > "${ICUVERSION_H_PATH}"
-fi
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * WebCore.vcxproj/WebCoreGenerated.make:
+ * WebCore.vcxproj/WebCoreGenerated.vcxproj:
+ * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters:
+ * WebCore.vcxproj/WebCorePreBuild.cmd:
+ * WebCore.vcxproj/build-generated-files.pl: Copied from Source/WebCore/WebCore.vcxproj/build-generated-files.sh.
+ * WebCore.vcxproj/build-generated-files.sh: Removed.
+ * WebCore.vcxproj/migrate-scripts.pl: Copied from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh.
+ * WebCore.vcxproj/migrate-scripts.sh: Removed.
+
2014-07-09 Anders Carlsson <andersca@apple.com>
Support transparent WKWebViews
make:\r
- if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XXWebCoreGeneratedXX/) { print } else { exit 1 }" "%ConfigurationBuildDir%\buildfailed"\r
+ if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XXWebCoreGeneratedXX/) { print } else { exit 1 }" "%ConfigurationBuildDir%\buildfailed"\r
if errorlevel 1 exit 1\r
echo XXWebCoreGeneratedXX > "%ConfigurationBuildDir%\buildfailed"\r
\r
- bash build-generated-files.sh "%ConfigurationBuildDir%" "%WebKit_Libraries%" windows "%PlatformArchitecture%"\r
- bash migrate-scripts.sh "%ConfigurationBuildDir%\obj%PlatformArchitecture%\WebCore\scripts"\r
+ perl build-generated-files.pl "%ConfigurationBuildDir%" "%WebKit_Libraries%" windows "%PlatformArchitecture%"\r
+ perl migrate-scripts.pl "%ConfigurationBuildDir%\obj%PlatformArchitecture%\WebCore\scripts"\r
cmd /C copyForwardingHeaders.cmd cg cf\r
cmd /C copyWebCoreResourceFiles.cmd\r
\r
</ItemGroup>
<ItemGroup>
<None Include="..\DerivedSources.make" />
- <None Include="build-generated-files.sh" />
+ <None Include="build-generated-files.pl" />
<None Include="copyForwardingHeaders.cmd" />
<None Include="copyWebCoreResourceFiles.cmd" />
- <None Include="migrate-scripts.sh" />
+ <None Include="migrate-scripts.pl" />
<None Include="MigrateScripts" />
<None Include="WebCoreGenerated.make" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <None Include="build-generated-files.sh" />
<None Include="copyForwardingHeaders.cmd" />
<None Include="copyWebCoreResourceFiles.cmd" />
<None Include="MigrateScripts" />
- <None Include="migrate-scripts.sh" />
<None Include="WebCoreGenerated.make" />
<None Include="..\DerivedSources.make" />
+ <None Include="build-generated-files.pl" />
+ <None Include="migrate-scripts.pl" />
</ItemGroup>
</Project>
\ No newline at end of file
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
set AngleHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private
--- /dev/null
+#!/usr/bin/perl -w
+
+# Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
+
+# Not all build environments have the webkitdirs module installed.
+my $NUMCPUS = 2;
+eval "use webkitdirs";
+unless ($@) {
+ $NUMCPUS = numberOfCPUs();
+}
+
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->updir);
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SOURCE_ROOT'} = $XSRCROOT;
+
+# Make sure we don't have any leading or trailing quotes
+for (@ARGV) {
+ s/^\"//;
+ s/\"$//;
+}
+
+my $XDSTROOT = Cwd::realpath($ARGV[0]);
+$ENV{'XDSTROOT'} = $XDSTROOT;
+
+my $SDKROOT = Cwd::realpath($ARGV[1]);
+$ENV{'SDKROOT'} = $SDKROOT;
+
+my $BUILD_PRODUCTS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[3]", 'WebCore');
+$ENV{'BUILT_PRODUCTS_DIR'} = $BUILD_PRODUCTS_DIR;
+
+my $DERIVED_SOURCES_DIR = File::Spec->catdir($BUILD_PRODUCTS_DIR, 'DerivedSources');
+unless (-d $DERIVED_SOURCES_DIR) {
+ make_path($DERIVED_SOURCES_DIR) or die "Couldn't create $DERIVED_SOURCES_DIR: $!";
+}
+
+chdir $DERIVED_SOURCES_DIR or die "Couldn't change directory to $DERIVED_SOURCES_DIR: $!";
+
+$ENV{'WebCore'} = $XSRCROOT;
+
+my $featureDefinesCommand = File::Spec->catfile($SDKROOT, 'tools', 'scripts', 'feature-defines.pl');
+my $featureDefines = `$featureDefinesCommand $SDKROOT $ARGV[2]`;
+chomp($featureDefines);
+$ENV{'FEATURE_DEFINES'} = $featureDefines;
+$ENV{'InspectorScripts'} = File::Spec->catdir($XDSTROOT, 'include', 'private', 'JavaScriptCore');
+$ENV{'WebReplayScripts'} = File::Spec->catdir($XDSTROOT, 'include', 'private', 'JavaScriptCore');
+
+my $DERIVED_SOURCES_MAKEFILE = File::Spec->catfile($XSRCROOT, 'DerivedSources.make');
+system('/usr/bin/make', '-f', $DERIVED_SOURCES_MAKEFILE, '-j', $NUMCPUS) and die "Failed to build $DERIVED_SOURCES_MAKEFILE: $!";
-#!/usr/bin/bash
+#!/usr/bin/perl -w
-# Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-NUMCPUPATH="../../Tools/Scripts/num-cpus"
-if [ -x $NUMCPUPATH ]; then
- NUMCPUS=`$NUMCPUPATH`
-else
- NUMCPUS=1
-fi
-
-mkdir -p "$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
-
-export WEBCORE=$XSRCROOT
-export WEBKIT_OUTPUT=$XDSTROOT
-
-make -f "$WEBCORE/WebCore.vcxproj/MigrateScripts" -j ${NUMCPUS} || exit 1
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
+
+# Not all build environments have the webkitdirs module installed.
+my $NUMCPUS = 2;
+eval "use webkitdirs";
+unless ($@) {
+ $NUMCPUS = numberOfCPUs();
+}
+
+# Make sure we don't have any leading or trailing quotes
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
+my $MIGRATION_DIR = File::Spec->canonpath($ARGV[0]);
+unless (-d $MIGRATION_DIR) {
+ make_path($MIGRATION_DIR) or die "Couldn't create $MIGRATION_DIR: $!";
+}
+$MIGRATION_DIR = Cwd::realpath($MIGRATION_DIR);
+
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->updir);
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SOURCE_ROOT'} = $XSRCROOT;
+
+my $XDSTROOT = Cwd::realpath($ARGV[0]);
+$ENV{'XDSTROOT'} = $XDSTROOT;
+
+$ENV{'WEBCORE'} = $XSRCROOT;
+$ENV{'WebCore'} = $XSRCROOT;
+$ENV{'WEBKIT_OUTPUT'} = $XDSTROOT;
+
+my $MIGRATE_SCRIPTS_MAKEFILE = File::Spec->catfile($XSRCROOT, 'WebCore.vcxproj', 'MigrateScripts');
+system('/usr/bin/make', '-f', $MIGRATE_SCRIPTS_MAKEFILE, '-j', $NUMCPUS) and die "Failed to build $MIGRATE_SCRIPTS_MAKEFILE: $!";
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * WebInspectorUI.vcxproj/WebInspectorUI.make:
+ * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
+ * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
+ * WebInspectorUI.vcxproj/build-webinspectorui.pl: Copied from Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.sh.
+ * WebInspectorUI.vcxproj/build-webinspectorui.sh: Removed.
+
2014-07-08 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Debugger popovers should not dismiss when mousing over them
make:\r
- bash build-webinspectorui.sh "%ConfigurationBuildDir%" "%WebKit_Libraries%" windows "%PlatformArchitecture%"\r
+ perl build-webinspectorui.pl "%ConfigurationBuildDir%" "%WebKit_Libraries%" windows "%PlatformArchitecture%"\r
if errorlevel 1 exit 1\r
\r
- xcopy /y /e "..\Localizations\en.lproj\*" "%ConfigurationBuildDir%\bin%PlatformArchitecture%\WebKit.resources\WebInspectorUI"
+ xcopy /y /e "..\Localizations\en.lproj\*" "%ConfigurationBuildDir%\bin%PlatformArchitecture%\WebKit.resources\WebInspectorUI"\r
if errorlevel 1 exit 1\r
\r
- if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
+ if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"\r
\r
clean:\r
if exist "%ConfigurationBuildDir%\bin%PlatformArchitecture%\WebKit.resources\WebInspectorUI" del /s /q "%ConfigurationBuildDir%\bin%PlatformArchitecture%\WebKit.resources\WebInspectorUI"\r
<None Include="..\UserInterface\TreeOutline.js" />
<None Include="..\UserInterface\Utilities.js" />
<None Include="..\UserInterface\WebInspector.js" />
- <None Include="build-webinspectorui.sh" />
+ <None Include="build-webinspectorui.pl" />
<None Include="WebInspectorUI.make" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Filter>Scripts</Filter>
</None>
<None Include="WebInspectorUI.make" />
- <None Include="build-webinspectorui.sh" />
+ <None Include="build-webinspectorui.pl" />
</ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+#!/usr/bin/perl -w
+
+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple puter, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use Cwd;
+use File::Path qw(make_path);
+use File::Spec;
+
+my $PWD = Cwd::cwd();
+my $XSRCROOT = Cwd::realpath(File::Spec->updir);
+$ENV{'XSRCROOT'} = $XSRCROOT;
+$ENV{'SRCROOT'} = $XSRCROOT;
+
+# Make sure we don't have any leading or trailing quotes
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
+my $XDSTROOT = Cwd::realpath($ARGV[0]);
+$ENV{'XDSTROOT'} = $XDSTROOT;
+
+my $TARGET_BUILD_DIR = File::Spec->catdir($XDSTROOT, "bin$ARGV[3]", 'WebKit.resources');
+$ENV{'TARGET_BUILD_DIR'} = $TARGET_BUILD_DIR;
+my $JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[3]", 'JavaScriptCore', 'DerivedSources');
+$ENV{'JAVASCRIPTCORE_PRIVATE_HEADERS_DIR'} = $JAVASCRIPTCORE_PRIVATE_HEADERS_DIR;
+my $WEBCORE_PRIVATE_HEADERS_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[3]", 'WebCore', 'DerivedSources');
+$ENV{'WEBCORE_PRIVATE_HEADERS_DIR'} = $WEBCORE_PRIVATE_HEADERS_DIR;
+my $DERIVED_SOURCES_DIR = File::Spec->catdir($XDSTROOT, "obj$ARGV[3]", 'WebInspectorUI', 'DerivedSources');
+$ENV{'DERIVED_SOURCES_DIR'} = $DERIVED_SOURCES_DIR;
+
+$ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'} = 'WebInspectorUI';
+
+if (($TARGET_BUILD_DIR =~ /Release/) || ($TARGET_BUILD_DIR =~ /Production/)) {
+ $ENV{'COMBINE_INSPECTOR_RESOURCES'} = 'YES';
+}
+
+my $copyResourcesCommand = File::Spec->catfile($XSRCROOT, 'Scripts', 'copy-user-interface-resources.pl');
+do $copyResourcesCommand;
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * WebKit.vcxproj/Interfaces/FixMIDLHeaders.pl:
+ * WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd:
+ * WebKit.vcxproj/WebKit/WebKitPreBuild.cmd:
+ * WebKit.vcxproj/WebKit/WebKitVersion.cmd:
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd:
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd:
+ * WebKit.vcxproj/WebKitGUID/WebKitGUIDPreBuild.cmd:
+
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove use of 'grep' in build steps
#! /usr/bin/perl -w
-# Copyright (C) 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
use strict;
use warnings;
+# Make sure we don't have any leading or trailing quotes
+$ARGV[0] =~ s/^\"//;
+$ARGV[0] =~ s/\"$//;
+
my $dir = $ARGV[0];
$dir = `cygpath -u '$dir'`;
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
set WEBKITVERSIONFILE=%WEBKITVERSIONDIR%\WebKitVersion.h
set PATH=%SystemDrive%\cygwin\bin;%PATH%
-bash -c '/usr/bin/perl "%WEBKITVERSIONSCRIPT%" --config "%WEBKITVERSIONCONFIG%" --outputDir "%WEBKITVERSIONDIR%"'
+perl "%WEBKITVERSIONSCRIPT%" --config "%WEBKITVERSIONCONFIG%" --outputDir "%WEBKITVERSIONDIR%"
-%SystemDrive%\cygwin\bin\which.exe bash
+%SystemDrive%\cygwin\bin\which.exe ruby
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
echo Generating export definitions
del /F /Q "%GeneratorDirectory%/DerivedSources/WebKitExportGenerator.cpp"
-bash -c "./make-export-file-generator ./WebKitExports.def.in '%GeneratorDirectory%/DerivedSources/WebKitExportGenerator.cpp'"
+ruby ./make-export-file-generator ./WebKitExports.def.in '%GeneratorDirectory%/DerivedSources/WebKitExportGenerator.cpp'
del /F /Q "%OUTDIR%\WebKitExportGenerator%DEBUGSUFFIX%.exe"
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd:
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd:
+
2014-07-09 Brent Fulgham <bfulgham@apple.com>
[Win] Remove use of 'grep' in build steps
%SystemDrive%\cygwin\bin\which.exe perl\r
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%\r
cmd /c\r
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"\r
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"\r
if errorlevel 1 exit 1\r
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"\r
\r
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
%SystemDrive%\cygwin\bin\which.exe perl
if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
cmd /c
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnne "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" perl -wnle "if (/XX%PROJECTNAME%XX/) { print } else { exit 1 }" "%CONFIGURATIONBUILDDIR%\buildfailed"
if errorlevel 1 exit 1
echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
+2014-07-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Remove uses of 'bash' in build system
+ https://bugs.webkit.org/show_bug.cgi?id=134782
+ <rdar://problem/17615533>
+
+ Reviewed by Dean Jackson.
+
+ Remove uses of 'bash' by replacing Windows-specific bash scripts
+ with Perl equivalents.
+
+ * win/tools/scripts/feature-defines.pl: Copied from WebKitLibraries/win/tools/scripts/feature-defines.sh.
+ * win/tools/scripts/feature-defines.sh: Removed.
+
2014-07-08 Brent Fulgham <bfulgham@apple.com>
[Win] Implement auto-version as a Perl program
-#!/usr/bin/bash
+#!/usr/bin/perl -w
-# Copyright (C) 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2013-2014 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-if [ "$2" = "cairo" ]; then
- FeatureDefines=$1/tools/vsprops/FeatureDefinesCairo.props
-else
- FeatureDefines=$1/tools/vsprops/FeatureDefines.props
-fi
+use strict;
+use File::Spec;
+
+my $FeatureDefines = ($ARGV[1] eq 'cairo') ? 'FeatureDefinesCairo.props' : 'FeatureDefines.props';
+my $FeatureDefinesFile = File::Spec->catfile($ARGV[0], 'tools', 'vsprops', $FeatureDefines);
+
+open(FEATURE_DEFINES, '<', $FeatureDefinesFile) or die "Unable to open $FeatureDefinesFile: $!";
+my @lines = <FEATURE_DEFINES>;
+close(FEATURE_DEFINES);
+
+my @enabled = grep(/<ENABLE_/, @lines);
+@enabled = grep(!/\/>/, @enabled);
+for (@enabled) {
+ s/<\/.*>//;
+ s/<.*>//;
+ s/^\s+//;
+ s/\s+$//;
+ chomp();
+}
-grep "<ENABLE_" $FeatureDefines | sed '/\/>/d' | sed 's/<\/.*>//' | sed 's/<.*>//' | tr -d '\n'
+my $result = join(' ', @enabled);
+print "$result";