Simplify syntax for quasi-quotation
[ghc-hetmet.git] / boot
1 #! /bin/sh
2 set -e
3
4 # Create libraries/*/{ghc.mk,GNUmakefile}
5 bash boot-pkgs
6
7 # Check that we have all boot packages.
8 for dir in `grep "^[^# ][^ ]*  *[^ ][^ ]*  *[^ ][^ ]*$" packages | sed "s/ .*//"`
9 do
10     # We would like to just check for an _darcs directory here, but in
11     # an lndir tree we avoid making _darcs directories, so it doesn't
12     # exist. We therefore require that every repo has a LICENSE file
13     # instead.
14     if test ! -f $dir/LICENSE
15     then
16         echo "Error: $dir/LICENSE doesn't exist." >&2
17         echo "Maybe you haven't done './darcs-all get'?" >&2
18         exit 1
19     fi
20 done
21
22 # autoreconf everything that needs it.
23 for dir in . libraries/*
24 do
25     if test -f $dir/configure.ac
26     then
27         echo "Booting $dir"
28         ( cd $dir && autoreconf )
29     fi
30 done
31
32 # Alas, darcs doesn't handle file permissions, so fix a few of them.
33 for f in boot darcs-all push-all validate
34 do
35     if test -f $f
36     then
37         chmod +x $f
38     fi
39 done