X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=boot;h=339f21dca28f0a1be825b7e4b0b44278e75cd29a;hb=e3d0f33551f53f8f78739faf168a6bb94f676c0d;hp=70d99e692a9abae572f07328280bffb2653f285a;hpb=6ddc8fd8b4952a23d1016dbad4263b89b63c5ae3;p=ghc-hetmet.git diff --git a/boot b/boot index 70d99e6..339f21d 100644 --- a/boot +++ b/boot @@ -11,7 +11,8 @@ system("/usr/bin/perl", "-w", "boot-pkgs") == 0 my $dir; my $curdir; -$curdir = &cwd(); +$curdir = &cwd() + or die "Can't find current directory: $!"; # Check that we have all boot packages. open PACKAGES, "< packages"; @@ -45,13 +46,15 @@ close PACKAGES; foreach $dir (".", glob("libraries/*/")) { if (-f "$dir/configure.ac") { print "Booting $dir\n"; - chdir $dir; - system "autoreconf"; - chdir $curdir; + chdir $dir or die "can't change to $dir: $!"; + system("autoreconf") == 0 + or die "Running autoreconf failed with exitcode $?"; + chdir $curdir or die "can't change to $curdir: $!"; } } # Alas, darcs doesn't handle file permissions, so fix a few of them. -for my $file ("boot", "darcs-all", "push-all", "validate") { - chmod 0755, $file if -f $file; +for my $file ("boot", "darcs-all", "validate") { + chmod 0755, $file if -f $file + or die "Can't chmod 0755 $file: $!"; }