[commit: ghc] master: Move libffi's tarball into its own repo (9e118d0)

Ian Lynagh igloo at ghc.haskell.org
Tue Jul 30 17:39:28 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9e118d0a719f11cb7cabe783f87a85aac583b84d

>---------------------------------------------------------------

commit 9e118d0a719f11cb7cabe783f87a85aac583b84d
Author: Ian Lynagh <ian at well-typed.com>
Date:   Tue Jul 30 15:54:30 2013 +0100

    Move libffi's tarball into its own repo
    
    This means that ghc-tarballs is only needed on Windows

>---------------------------------------------------------------

 libffi/ghc.mk |    2 +-
 packages      |    3 ++-
 sync-all      |   23 ++++++++++++++++++-----
 3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index d761a43..2e333df 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -55,7 +55,7 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
 	$(call removeFiles,$(libffi_STAMP_STATIC_SHARED_BUILD))
 	$(call removeFiles,$(libffi_STAMP_STATIC_SHARED_INSTALL))
 	$(call removeTrees,$(LIBFFI_DIR) libffi/build)
-	cat ghc-tarballs/libffi/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; }
+	cat libffi-tarballs/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; }
 	mv libffi/libffi-* libffi/build
 
 # We have to fake a non-working ln for configure, so that the fallback
diff --git a/packages b/packages
index 7f8a8ab..ecba5c8 100644
--- a/packages
+++ b/packages
@@ -42,7 +42,8 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #    localpath                tag           remotepath
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-ghc-tarballs                    -           ghc-tarballs.git
+ghc-tarballs                    windows     ghc-tarballs.git
+libffi-tarballs                 -           libffi-tarballs.git
 utils/hsc2hs                    -           hsc2hs.git
 utils/haddock                   -           haddock.git
 libraries/array                 -           packages/array.git
diff --git a/sync-all b/sync-all
index 741e22b..5d7e313 100755
--- a/sync-all
+++ b/sync-all
@@ -2,6 +2,7 @@
 
 use strict;
 use Cwd;
+use English;
 
 $| = 1; # autoflush stdout after each print, to avoid output after die
 
@@ -55,6 +56,8 @@ sub parsePackages {
             $line{"tag"}        = $2;
             $line{"remotepath"} = $3;
             push @packages, \%line;
+
+            $tags{$2} = 0;
         }
         elsif (! /^(#.*)?$/) {
             die "Bad content on line $lineNum of packages file: $_";
@@ -244,8 +247,6 @@ sub gitall {
 
     my $is_github_repo = $repo_base =~ m/(git@|git:\/\/|https:\/\/)github.com/;
 
-    parsePackages;
-
     @args = ();
 
     if ($command =~ /^remote$/) {
@@ -554,14 +555,18 @@ sub help
 {
         my $exit = shift;
 
+        my $tags = join ' ', sort (grep !/^-$/, keys %tags);
+
         # Get the built in help
         my $help = <<END;
 Usage:
 
 ./sync-all [-q] [-s] [--ignore-failure] [-r repo] [--checked-out] [--bare]
-           [--nofib] [--extra] [--testsuite] [--no-dph] [--resume]
+           [--<tag>] [--no-<tag>] [--resume]
            cmd [git flags]
 
+    where <tag> is one of: $tags
+
 Applies the command "cmd" to each repository in the tree.
 
 A full repository tree is obtained by first cloning the ghc
@@ -752,8 +757,13 @@ END
 
 sub main {
 
+    &parsePackages();
+
     $tags{"-"} = 1;
     $tags{"dph"} = 1;
+    if ($OSNAME =~ /^(MSWin32|Cygwin)$/) {
+        $tags{"windows"} = 1;
+    }
 
     while ($#_ ne -1) {
         my $arg = shift;
@@ -792,12 +802,15 @@ sub main {
         }
         # --<tag> says we grab the libs tagged 'tag' with
         # 'get'. It has no effect on the other commands.
-        elsif ($arg =~ m/^--no-(.*)$/) {
+        elsif ($arg =~ m/^--no-(.*)$/ && defined($tags{$1})) {
             $tags{$1} = 0;
         }
-        elsif ($arg =~ m/^--(.*)$/) {
+        elsif ($arg =~ m/^--(.*)$/ && defined($tags{$1})) {
             $tags{$1} = 1;
         }
+        elsif ($arg =~ m/^-/) {
+            die "Unrecognised flag: $arg";
+        }
         else {
             unshift @_, $arg;
             if (grep /^-q$/, @_) {






More information about the ghc-commits mailing list