10 $required_tag{"-"} = 1;
13 while ($#ARGV ne -1) {
14 my $arg = shift @ARGV;
16 if ($arg =~ /^--required-tag=(.*)/) {
17 $required_tag{$1} = 1;
19 elsif ($arg =~ /^--validate$/) {
29 open FILE, "packages" or die "Couldn't open file: $!";
34 if ($string =~ /\r/) {
37 Perhaps you need to run
38 git config --global core.autocrlf false
39 and re-check out the tree?
45 # Create libraries/*/{ghc.mk,GNUmakefile}
46 system("/usr/bin/perl", "-w", "boot-pkgs") == 0
47 or die "Running boot-pkgs failed: $?";
54 or die "Can't find current directory: $!";
56 # Check that we have all boot packages.
57 open PACKAGES, "< packages";
62 elsif (/^([a-zA-Z0-9\/.-]+) +([^ ]+) +[^ ]+ +[^ ]+ +[^ ]+$/) {
66 # If $tag is not "-" then it is an optional repository, so its
67 # absence isn't an error.
68 if (defined($required_tag{$tag})) {
69 # We would like to just check for a .git directory here,
70 # but in an lndir tree we avoid making .git directories,
71 # so it doesn't exist. We therefore require that every repo
72 # has a LICENSE file instead.
73 if (! -f "$dir/LICENSE") {
74 print STDERR "Error: $dir/LICENSE doesn't exist.\n";
75 die "Maybe you haven't done './sync-all get'?";
80 die "Bad line in packages file: $_";
85 # autoreconf everything that needs it.
86 foreach $dir (".", glob("libraries/*/")) {
87 if (-f "$dir/configure.ac") {
88 print "Booting $dir\n";
89 chdir $dir or die "can't change to $dir: $!";
90 system("autoreconf") == 0
91 or die "Running autoreconf failed with exitcode $?";
92 chdir $curdir or die "can't change to $curdir: $!";
96 if ($validate eq 0 && ! -f "mk/build.mk") {
99 WARNING: You don't have a mk/build.mk file.
101 By default a standard GHC build will be done, which uses optimisation
102 and builds the profiling libraries. This will take a long time, so may
103 not be what you want if you are developing GHC or the libraries, rather
104 than simply building it to use it.
106 For information on creating a mk/build.mk file, please see:
107 http://hackage.haskell.org/trac/ghc/wiki/Building/Using#Buildconfiguration