9 $required_tag{"-"} = 1;
11 while ($#ARGV ne -1) {
12 my $arg = shift @ARGV;
14 if ($arg =~ /^--required-tag=(.*)/) {
15 $required_tag{$1} = 1;
22 # Create libraries/*/{ghc.mk,GNUmakefile}
23 system("/usr/bin/perl", "-w", "boot-pkgs") == 0
24 or die "Running boot-pkgs failed: $?";
31 or die "Can't find current directory: $!";
33 # Check that we have all boot packages.
34 open PACKAGES, "< packages";
39 elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+ +[^ ]+ +[^ ]+$/) {
43 # If $tag is not "-" then it is an optional repository, so its
44 # absence isn't an error.
45 if (defined($required_tag{$tag})) {
46 # We would like to just check for an _darcs directory here,
47 # but in an lndir tree we avoid making _darcs directories,
48 # so it doesn't exist. We therefore require that every repo
49 # has a LICENSE file instead.
50 if (! -f "$dir/LICENSE") {
51 print STDERR "Error: $dir/LICENSE doesn't exist.\n";
52 die "Maybe you haven't done './darcs-all get'?";
57 die "Bad line in packages file: $_";
62 # autoreconf everything that needs it.
63 foreach $dir (".", glob("libraries/*/")) {
64 if (-f "$dir/configure.ac") {
65 print "Booting $dir\n";
66 chdir $dir or die "can't change to $dir: $!";
67 system("autoreconf") == 0
68 or die "Running autoreconf failed with exitcode $?";
69 chdir $curdir or die "can't change to $curdir: $!";
73 # Alas, darcs doesn't handle file permissions, so fix a few of them.
74 for my $file ("boot", "darcs-all", "validate") {
77 or die "Can't chmod 0755 $file: $!";