Add --ccache option to speedup build using ccahe
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 11 Sep 2012 04:42:11 +0000 (12:42 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 11 Sep 2012 04:42:11 +0000 (12:42 +0800)
Change-Id: I91f4cab5c13b715632b419b388063bacc92edbf0

depanneur

index fdcc3e6004547e73206b36014484e4b7ce4365f2..d858775cc1fab514760681b9977504136f81d1ce 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -92,6 +92,7 @@ my $run_configure = 0;
 my $overwrite = 0;
 my $MAX_THREADS = 1;
 my $extra_packs = "";
+my $ccache = 0;
 
 my @tobuild = ();
 my @tofind = ();
@@ -132,6 +133,7 @@ GetOptions (
     "no-configure" => \$run_configure,
     "threads=s" => \$MAX_THREADS,
     "extra-packs=s" => \$extra_packs,
+    "ccache=s" => \$ccache,
     );
 
 if ( $help ) {
@@ -678,6 +680,7 @@ sub build_package {
     push @args, "--configdir $dist_configs";
     push @args, "--arch $archpath";
     push @args, "$srpm_filename";
+    push @args, "--ccache" if ($ccache);
     if (! $extra_packs eq "") {
         my $packs = join(' ', split(',', $extra_packs));
         push @args, "--extra-packs=\"$packs\"";