Skip to content

Commit

Permalink
Move libffi's tarball into its own repo
Browse files Browse the repository at this point in the history
This means that ghc-tarballs is only needed on Windows
  • Loading branch information
Ian Lynagh committed Jul 30, 2013
1 parent 9e185cc commit 9e118d0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libffi/ghc.mk
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion packages
Expand Up @@ -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
Expand Down
23 changes: 18 additions & 5 deletions sync-all
Expand Up @@ -2,6 +2,7 @@

use strict;
use Cwd;
use English;

$| = 1; # autoflush stdout after each print, to avoid output after die

Expand Down Expand Up @@ -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: $_";
Expand Down Expand Up @@ -244,8 +247,6 @@ sub gitall {

my $is_github_repo = $repo_base =~ m/(git@|git:\/\/|https:\/\/)github.com/;

parsePackages;

@args = ();

if ($command =~ /^remote$/) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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$/, @_) {
Expand Down

0 comments on commit 9e118d0

Please sign in to comment.