7 # Create libraries/*/{ghc.mk,GNUmakefile}
8 system("/usr/bin/perl", "-w", "boot-pkgs") == 0
9 or die "Running boot-pkgs failed: $?";
15 or die "Can't find current directory: $!";
17 # Check that we have all boot packages.
18 open PACKAGES, "< packages";
23 elsif (/^([a-zA-Z0-9\/.-]+) *[^ ]+ *[^ ]+$/) {
26 # We would like to just check for an _darcs directory here, but in
27 # an lndir tree we avoid making _darcs directories, so it doesn't
28 # exist. We therefore require that every repo has a LICENSE file
30 if (! -f "$dir/LICENSE") {
31 print STDERR "Error: $dir/LICENSE doesn't exist.\n";
32 die "Maybe you haven't done './darcs-all get'?";
35 elsif (/^([a-zA-Z0-9\/.-]+) *[^ ]+ *[^ ]+ *[^ ]+$/) {
36 # These are lines which refer to optional repositories, so their
37 # absence isn't an error.
40 die "Bad line in packages file: $_";
45 # autoreconf everything that needs it.
46 foreach $dir (".", glob("libraries/*/")) {
47 if (-f "$dir/configure.ac") {
48 print "Booting $dir\n";
49 chdir $dir or die "can't change to $dir: $!";
50 system("autoreconf") == 0
51 or die "Running autoreconf failed with exitcode $?";
52 chdir $curdir or die "can't change to $curdir: $!";
56 # Alas, darcs doesn't handle file permissions, so fix a few of them.
57 for my $file ("boot", "darcs-all", "validate") {
58 chmod 0755, $file if -f $file
59 or die "Can't chmod 0755 $file: $!";