[Win] Correct Cygwin Path Confusion in WebInspectorUI Build
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2014 22:19:35 +0000 (22:19 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 May 2014 22:19:35 +0000 (22:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132826

Reviewed by Joseph Pecoraro.

* Scripts/copy-user-interface-resources.pl: If the build is running
under Cygwin, be sure to use '/usr/bin/python', instead of just
'python' to avoid build errors.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl

index b88e1fd0b06e7444d007d21a41e9b6a6d4c5030f..0bd7d1e7c51da5e2bb24e2f2b381786c80829514 100644 (file)
@@ -1,3 +1,14 @@
+2014-05-12  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Correct Cygwin Path Confusion in WebInspectorUI Build
+        https://bugs.webkit.org/show_bug.cgi?id=132826
+
+        Reviewed by Joseph Pecoraro.
+
+        * Scripts/copy-user-interface-resources.pl: If the build is running
+        under Cygwin, be sure to use '/usr/bin/python', instead of just
+        'python' to avoid build errors.
+
 2014-05-09  Alberto Garcia  <berto@igalia.com>
 
         jsmin.py license header confusing, mentions non-free license
index be1e3b6a48d7a1f4090e24eeb86a8c155eb4a333..094cf8cdb9c80395d6f088a4d8becbcb901104b7 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/perl -w
 
+use English;
 use File::Copy qw(copy);
 use File::Path qw(make_path);
 use File::Spec;
@@ -76,6 +77,7 @@ my $LICENSE = <<'EOF';
  */
 EOF
 
+my $python = ($OSNAME =~ /cygwin/) ? "/usr/bin/python" : "python";
 my $derivedSourcesDir = $ENV{'DERIVED_SOURCES_DIR'};
 my $scriptsRoot = File::Spec->catdir($ENV{'SRCROOT'}, 'Scripts');
 my $uiRoot = File::Spec->catdir($ENV{'SRCROOT'}, 'UserInterface');
@@ -141,14 +143,14 @@ if (defined $ENV{'COMBINE_INSPECTOR_RESOURCES'} && ($ENV{'COMBINE_INSPECTOR_RESO
     # Minify the Main.js and Main.css files, with Main.js appending to the license that was exported above.
     my $jsMinScript = File::Spec->catfile($scriptsRoot, 'jsmin.py');
     my $cssMinScript = File::Spec->catfile($scriptsRoot, 'cssmin.py');
-    system(qq(python "$jsMinScript" < "$derivedSourcesMainJS" >> "$targetMainJS")) and die "Failed to minify $derivedSourcesMainJS: $!";
-    system(qq(python "$cssMinScript" < "$derivedSourcesMainCSS" >> "$targetMainCSS")) and die "Failed to minify $derivedSourcesMainCSS: $!";
+    system(qq("$python" "$jsMinScript" < "$derivedSourcesMainJS" >> "$targetMainJS")) and die "Failed to minify $derivedSourcesMainJS: $!";
+    system(qq("$python" "$cssMinScript" < "$derivedSourcesMainCSS" >> "$targetMainCSS")) and die "Failed to minify $derivedSourcesMainCSS: $!";
 
     # Minify the CodeMirror.js and CodeMirror.css files, appending to the license that was exported above.
     my $derivedSouressCodeMirrorJS = File::Spec->catfile($derivedSourcesDir, 'CodeMirror.js');
     my $derivedSourcesCodeMirrorCSS = File::Spec->catfile($derivedSourcesDir, 'CodeMirror.css');
-    system(qq(python "$jsMinScript" < "$derivedSouressCodeMirrorJS" >> "$targetCodeMirrorJS")) and die "Failed to minify $derivedSouressCodeMirrorJS: $!";
-    system(qq(python "$cssMinScript" < "$derivedSourcesCodeMirrorCSS" >> "$targetCodeMirrorCSS")) and die "Failed to minify $derivedSourcesCodeMirrorCSS: $!";
+    system(qq("$python" "$jsMinScript" < "$derivedSouressCodeMirrorJS" >> "$targetCodeMirrorJS")) and die "Failed to minify $derivedSouressCodeMirrorJS: $!";
+    system(qq("$python" "$cssMinScript" < "$derivedSourcesCodeMirrorCSS" >> "$targetCodeMirrorCSS")) and die "Failed to minify $derivedSourcesCodeMirrorCSS: $!";
 
     # Copy over Main.html and the Images directory.
     copy($derivedSourcesMainHTML, File::Spec->catfile($targetResourcePath, 'Main.html'));