Cleanup of equality rewriting and no swapInsts for wanteds
[ghc-hetmet.git] / boot
1 #! /bin/sh
2 set -e
3
4 # Check that we have all core packages.
5 for dir in `cat libraries/core-packages`; do
6   if test ! -d libraries/$dir; then
7     echo "Looks like you're missing libraries/$dir, maybe you haven't done './darcs-all get'?" >&2
8     exit 1
9   fi
10 done
11
12 # We don't recurse into the library packages with autoreconf anymore,
13 # so we have to do this manually. To avoid a strict dependency on
14 # autoreconf, we are careful to call autoreconf only when configure
15 # does not exist yet or the corresponding configure.ac/aclocal.m4 is
16 # newer. This would be dead easy if every shell supported the "-nt"
17 # option for "test", but this is not the case. The only portable
18 # solution seems to be via find's "-newer" option or to basically give
19 # up and replace find with perl: :-P
20 #
21 #   perl -e 'print "configure.ac\n" if -M "configure.ac" < -M "configure"'
22 for dir in . libraries/*; do
23   if test -f $dir/configure.ac; then
24     ( cd $dir ; { test ! -f configure || test -n "`find -L configure.ac -newer configure`" || (test -f aclocal.m4 && test -n "`find -L aclocal.m4 -newer configure`"); } && autoreconf )
25   fi
26 done
27
28 # Alas, darcs doesn't handle file permissions, so fix a few of them.
29 for f in boot darcs-all push-all validate; do
30   test -f $f && chmod +x $f
31 done