[Box Backup-commit] COMMIT r2492 - box/trunk/infrastructure

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Fri Apr 3 01:17:36 BST 2009


Author: chris
Date: 2009-04-03 01:17:35 +0100 (Fri, 03 Apr 2009)
New Revision: 2492

Modified:
   box/trunk/infrastructure/makeparcels.pl.in
Log:
Use update copy to speed up rebuilds on windows/cygwin.


Modified: box/trunk/infrastructure/makeparcels.pl.in
===================================================================
--- box/trunk/infrastructure/makeparcels.pl.in	2009-04-02 00:06:07 UTC (rev 2491)
+++ box/trunk/infrastructure/makeparcels.pl.in	2009-04-03 00:17:35 UTC (rev 2492)
@@ -25,6 +25,13 @@
 	return 0;
 }
 
+my $copy_command = "cp -p";
+
+if ($build_os eq 'CYGWIN')
+{
+	$copy_command = "cp -pu"; # faster
+}
+
 open PARCELS,"parcels.txt" or die "Can't open parcels file";
 {
 	my $cur_parcel = '';
@@ -168,7 +175,7 @@
 			print MAKE <<EOF;
 $dir/$name$exeext: release/bin/$name/$name$exeext
 	mkdir -p $dir
-	cp -p release/bin/$name/$name$exeext $dir
+	$copy_command release/bin/$name/$name$exeext $dir
 
 .PHONY: release/bin/$name/$name$exeext
 release/bin/$name/$name$exeext:
@@ -192,11 +199,11 @@
 			if ($optional)
 			{
 				print MAKE "\ttest -r $fullpath " .
-					"&& cp -p $fullpath $dir || true\n";
+					"&& $copy_command $fullpath $dir || true\n";
 			}
 			else
 			{
-				print MAKE "\tcp -p $fullpath $dir\n";
+				print MAKE "\t$copy_command $fullpath $dir\n";
 			}
 
 			print MAKE "\n";
@@ -208,7 +215,7 @@
 			print MAKE <<EOF;
 $dir/${name}.gz: docs/man/${name}.gz
 	mkdir -p $dir
-	cp -p docs/man/${name}.gz $dir
+	$copy_command docs/man/${name}.gz $dir
 
 EOF
 			# Releases have the docs pre-made, but users




More information about the Boxbackup-commit mailing list