[Win] Remove uses of 'bash' in build system
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jul 2014 23:48:26 +0000 (23:48 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jul 2014 23:48:26 +0000 (23:48 +0000)
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.

Source/JavaScriptCore:
* 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:

Source/WebCore:
* 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.

Source/WebInspectorUI:
* 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.

Source/WebKit:
* 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:

Source/WTF:
* 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.

Tools:
* 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:

WebKitLibraries:
* win/tools/scripts/feature-defines.pl: Copied from WebKitLibraries/win/tools/scripts/feature-defines.sh.
* win/tools/scripts/feature-defines.sh: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

54 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl [new file with mode: 0644]
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh [deleted file]
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl [new file with mode: 0644]
Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh [deleted file]
Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.pl [moved from Source/WebCore/WebCore.vcxproj/build-generated-files.sh with 51% similarity]
Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh [deleted file]
Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd
Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd
Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd
Source/WTF/ChangeLog
Source/WTF/WTF.vcxproj/WTFGenerated.make
Source/WTF/WTF.vcxproj/WTFGenerated.vcxproj
Source/WTF/WTF.vcxproj/WTFGenerated.vcxproj.filters
Source/WTF/WTF.vcxproj/WTFPreBuild.cmd
Source/WTF/WTF.vcxproj/build-generated-files.pl [moved from Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.sh with 56% similarity, mode: 0644]
Source/WTF/WTF.vcxproj/build-generated-files.sh [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCoreGenerated.make
Source/WebCore/WebCore.vcxproj/WebCoreGenerated.vcxproj
Source/WebCore/WebCore.vcxproj/WebCoreGenerated.vcxproj.filters
Source/WebCore/WebCore.vcxproj/WebCorePreBuild.cmd
Source/WebCore/WebCore.vcxproj/build-generated-files.pl [new file with mode: 0755]
Source/WebCore/WebCore.vcxproj/migrate-scripts.pl [moved from Source/WebCore/WebCore.vcxproj/migrate-scripts.sh with 56% similarity]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.make
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters
Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl [new file with mode: 0755]
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/Interfaces/FixMIDLHeaders.pl
Source/WebKit/WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd
Source/WebKit/WebKit.vcxproj/WebKit/WebKitPreBuild.cmd
Source/WebKit/WebKit.vcxproj/WebKit/WebKitVersion.cmd
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorBuildCmd.cmd
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExportGeneratorPreBuild.cmd
Source/WebKit/WebKit.vcxproj/WebKitGUID/WebKitGUIDPreBuild.cmd
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd
Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd
Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd
Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd
Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd
Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd
WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/scripts/feature-defines.pl [moved from WebKitLibraries/win/tools/scripts/feature-defines.sh with 64% similarity]

index 0b76d1b..5746577 100644 (file)
@@ -1,5 +1,34 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=134770
         <rdar://problem/17608783>
index 1a9c970..78a514e 100644 (file)
@@ -1,6 +1,6 @@
 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"
index 9259e46..3275c40 100644 (file)
@@ -52,7 +52,7 @@
   </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
index 9dce732..0febfee 100644 (file)
@@ -1,9 +1,9 @@
 <?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
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index 3715fff..5aff3ba 100644 (file)
@@ -1,6 +1,6 @@
 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:
index 720c61d..3f705e0 100644 (file)
@@ -274,10 +274,10 @@ nmake /nologo -f $(ProjectName).make DEBUGSUFFIX=_debug</NMakeReBuildCommandLine
   <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
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl
new file mode 100644 (file)
index 0000000..7afe748
--- /dev/null
@@ -0,0 +1,70 @@
+#!/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: $!";
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh
deleted file mode 100644 (file)
index 747ef39..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/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
index c6b8b3b..e6bdb85 100644 (file)
@@ -1,6 +1,6 @@
 all:
     touch "%ConfigurationBuildDir%\buildfailed"
-    bash build-LLIntDesiredOffsets.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
+    perl build-LLIntDesiredOffsets.pl "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%"
 
     -del "%ConfigurationBuildDir%\buildfailed"
 
index f35be4f..16f783f 100644 (file)
   <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
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl
new file mode 100644 (file)
index 0000000..84cb438
--- /dev/null
@@ -0,0 +1,58 @@
+#!/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: $!";
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh
deleted file mode 100644 (file)
index ad17e0a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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"
@@ -1,6 +1,6 @@
-#!/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: $!";
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh
deleted file mode 100755 (executable)
index 66313cc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/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
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index af50824..23c01fe 100644 (file)
@@ -1,5 +1,23 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=134770
         <rdar://problem/17608783>
index c7b4c72..059fc44 100644 (file)
@@ -1,8 +1,8 @@
 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
 
index f59a253..7d30095 100644 (file)
@@ -51,7 +51,7 @@
     </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
index bfaf74c..dd20edb 100644 (file)
@@ -1,9 +1,9 @@
 <?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
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
old mode 100755 (executable)
new mode 100644 (file)
similarity index 56%
rename from Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.sh
rename to Source/WTF/WTF.vcxproj/build-generated-files.pl
index b1d574a..0cb99da
@@ -1,6 +1,6 @@
-#!/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);
+}
diff --git a/Source/WTF/WTF.vcxproj/build-generated-files.sh b/Source/WTF/WTF.vcxproj/build-generated-files.sh
deleted file mode 100644 (file)
index 8232dfe..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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
index 0bcfaaa..9c0a219 100644 (file)
@@ -1,3 +1,23 @@
+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
index ff02931..8e60099 100644 (file)
@@ -1,10 +1,10 @@
 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
index c214262..787f90f 100644 (file)
   </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
index 84ea926..c66c30c 100644 (file)
@@ -1,12 +1,12 @@
 <?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
index 43fb0b7..717d56f 100644 (file)
@@ -1,7 +1,7 @@
 %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
diff --git a/Source/WebCore/WebCore.vcxproj/build-generated-files.pl b/Source/WebCore/WebCore.vcxproj/build-generated-files.pl
new file mode 100755 (executable)
index 0000000..09fae82
--- /dev/null
@@ -0,0 +1,78 @@
+#!/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: $!";
@@ -1,6 +1,6 @@
-#!/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: $!";
index 7c1defd..3f97df0 100644 (file)
@@ -1,3 +1,20 @@
+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
index f86f083..9685e26 100644 (file)
@@ -1,11 +1,11 @@
 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
index 3ba1809..55b9b9e 100644 (file)
     <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" />
index 46b0285..492fd5c 100644 (file)
       <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
diff --git a/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl b/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl
new file mode 100755 (executable)
index 0000000..63df518
--- /dev/null
@@ -0,0 +1,62 @@
+#!/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;
index 7533fc5..fbaa0f6 100644 (file)
@@ -1,5 +1,24 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=134770
         <rdar://problem/17608783>
index 863e1dd..b194c21 100644 (file)
@@ -1,6 +1,6 @@
 #! /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
@@ -34,6 +34,10 @@ use File::Find;
 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'`;
index a243670..bce122a 100644 (file)
@@ -1,7 +1,7 @@
 %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"
 
index 79818a4..ff21601 100644 (file)
@@ -1,7 +1,7 @@
 %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"
 
index 8db35b8..1a5507e 100644 (file)
@@ -4,4 +4,4 @@ set WEBKITVERSIONDIR=%CONFIGURATIONBUILDDIR%\include\WebKit
 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%"
index 9fc7296..9448676 100644 (file)
@@ -1,4 +1,4 @@
-%SystemDrive%\cygwin\bin\which.exe bash
+%SystemDrive%\cygwin\bin\which.exe ruby
 if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
 cmd /c
 
@@ -6,4 +6,4 @@ set GeneratorDirectory=%CONFIGURATIONBUILDDIR%/obj%PlatformArchitecture%/WebKitE
 
 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'
index f803166..df7d556 100644 (file)
@@ -12,7 +12,7 @@ del /F /Q "%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"
 
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index ebb7d2f..0b8bc9e 100644 (file)
@@ -1,5 +1,23 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=134770
         <rdar://problem/17608783>
index 1175a8a..1415f01 100644 (file)
@@ -1,7 +1,7 @@
 %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
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index bc0d9ba..72ab16a 100644 (file)
@@ -1,6 +1,6 @@
 %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"
index ddfeae9..f2e506e 100644 (file)
@@ -1,3 +1,17 @@
+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
@@ -1,6 +1,6 @@
-#!/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";