Title: [163935] trunk/Tools
Revision
163935
Author
[email protected]
Date
2014-02-11 20:06:42 -0800 (Tue, 11 Feb 2014)

Log Message

It should be possible to force copy-webkitlibraries-blahblah to copy things regardless of timestamp
https://bugs.webkit.org/show_bug.cgi?id=128646

Reviewed by Mark Rowe.

* Scripts/copy-webkitlibraries-to-product-directory:
(unpackIfNecessary):
(dittoHeaders):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (163934 => 163935)


--- trunk/Tools/ChangeLog	2014-02-12 03:53:02 UTC (rev 163934)
+++ trunk/Tools/ChangeLog	2014-02-12 04:06:42 UTC (rev 163935)
@@ -1,3 +1,14 @@
+2014-02-11  Filip Pizlo  <[email protected]>
+
+        It should be possible to force copy-webkitlibraries-blahblah to copy things regardless of timestamp
+        https://bugs.webkit.org/show_bug.cgi?id=128646
+
+        Reviewed by Mark Rowe.
+
+        * Scripts/copy-webkitlibraries-to-product-directory:
+        (unpackIfNecessary):
+        (dittoHeaders):
+
 2014-02-11  Brian Burg  <[email protected]>
 
         Web Replay: upstream replay input code generator and EncodedValue class

Modified: trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory (163934 => 163935)


--- trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory	2014-02-12 03:53:02 UTC (rev 163934)
+++ trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory	2014-02-12 04:06:42 UTC (rev 163935)
@@ -36,6 +36,7 @@
 my $llvmIncludePackage = "";
 my $llvmLibraryPackage = "";
 my $useFullLibPaths = 0;
+my $force = 0;
 
 my $programName = basename($0);
 my $usage = <<EOF;
@@ -46,6 +47,7 @@
   --use-llvm-includes=<path>    Get the LLVM inludes package from <path>
   --use-llvm-libraries=<path>   Get the LLVM libraries package from <path>
   --[no-]use-full-lib-paths     Toggle using full library paths
+  --[no-]force                  Toggle forcing the copy - i.e. ignoring timestamps (default: $force)
 EOF
 
 GetOptions(
@@ -54,7 +56,8 @@
     'wksi!' => \$wksi,
     'use-llvm-includes=s' => \$llvmIncludePackage,
     'use-llvm-libraries=s' => \$llvmLibraryPackage,
-    'use-full-lib-paths!' => \$useFullLibPaths
+    'use-full-lib-paths!' => \$useFullLibPaths,
+    'force!' => \$force
 );
 
 if ($showHelp) {
@@ -77,7 +80,7 @@
 sub unpackIfNecessary
 {
     my ($targetDir, $sampleFile, $package, $hasLibraries) = @_;
-    if (!-e $sampleFile || -M $sampleFile > -M $package) {
+    if ($force || !-e $sampleFile || -M $sampleFile > -M $package) {
         print "Unpacking $package into $targetDir\n";
         (system("tar -C $targetDir -xmf $package") == 0) or die;
         if ($hasLibraries) {
@@ -95,7 +98,7 @@
 sub dittoHeaders
 {
     my ($srcHeader, $header) = @_;
-    if (!-e $header || -M $header > -M $srcHeader) {
+    if ($force || !-e $header || -M $header > -M $srcHeader) {
         print "Updating $header\n";
         (system("ditto", $srcHeader, $header) == 0) or die;
     }
@@ -116,7 +119,7 @@
     foreach my $libName (@librariesToCopy) {
         my $srcLib = "WebKitLibraries/" . $libName;
         my $lib = "$libraryDir/" . $libName;
-        if (!-e $lib || -M $lib > -M $srcLib) {
+        if ($force || !-e $lib || -M $lib > -M $srcLib) {
             print "Updating $lib\n";
             (system("ditto", $srcLib, $lib) == 0) or die;
             (system($ranlib, $lib) == 0) or die;
@@ -226,7 +229,8 @@
             my $ranlibToken = "$libraryTargetDirectory/.ranlibToken-$filename";
             unlink($targetLibrary);
             symlink($sourceLibrary, $targetLibrary);
-            if (!-e $ranlibToken
+            if ($force
+                || !-e $ranlibToken
                 || !fileContentsEquals($ranlibToken, $sourceLibrary)
                 || -M $ranlibToken > -M $sourceLibrary) {
                 print "   Ranlib $filename\n";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to