don't make -ddump-if-trace imply -no-recomp
[ghc-hetmet.git] / push-all
index 9ade0d4..2ce0a3d 100644 (file)
--- a/push-all
+++ b/push-all
@@ -11,6 +11,10 @@ my $ignore_failure = 0;
 
 # --checked-out says we are pushing to a checked out tree
 my $checked_out = 0;
 
 # --checked-out says we are pushing to a checked out tree
 my $checked_out = 0;
+# --boot-only says we only want to push bootlibs, not extralibs
+my $boot_only = 0;
+# --push or --pull or --send?
+my $push_pull_send = "push";
 
 sub message {
     if ($verbose) {
 
 sub message {
     if ($verbose) {
@@ -30,7 +34,7 @@ sub darcs {
 }
 
 sub darcs_push {
 }
 
 sub darcs_push {
-    darcs ("push", "--no-set-default", @_);
+    darcs ($push_pull_send, "--no-set-default", @_);
 }
 
 sub pushall {
 }
 
 sub pushall {
@@ -45,7 +49,10 @@ sub pushall {
             message "== $dir not present or not a repository; skipping";
         }
     }
             message "== $dir not present or not a repository; skipping";
         }
     }
-    for my $pkg (`cat libraries/core-packages libraries/extra-packages`) {
+    my $library_lists = $boot_only
+                      ? "libraries/boot-packages"
+                      : "libraries/boot-packages libraries/extra-packages";
+    for my $pkg (`cat $library_lists`) {
         chomp $pkg;
         $dir = "libraries/$pkg";
         if (-d "$dir") {
         chomp $pkg;
         $dir = "libraries/$pkg";
         if (-d "$dir") {
@@ -70,9 +77,24 @@ sub main {
             if ($arg eq "-q") {
                 $verbose = 0;
             }
             if ($arg eq "-q") {
                 $verbose = 0;
             }
+            elsif ($arg eq "--ignore-failure") {
+                $ignore_failure = 1;
+            }
             elsif ($arg eq "--checked-out") {
                 $checked_out = 1;
             }
             elsif ($arg eq "--checked-out") {
                 $checked_out = 1;
             }
+            elsif ($arg eq "--boot-only") {
+                $boot_only = 1;
+            }
+            elsif ($arg eq "--push") {
+                $push_pull_send = "push";
+            }
+            elsif ($arg eq "--pull") {
+                $push_pull_send = "pull";
+            }
+            elsif ($arg eq "--send") {
+                $push_pull_send = "send";
+            }
             else {
                 $reporoot = $arg;
                 if (grep /^-q$/, @_) {
             else {
                 $reporoot = $arg;
                 if (grep /^-q$/, @_) {