4 # Check that we have all boot packages.
5 for dir in `grep "^[^# ][^ ]* *[^ ][^ ]* *[^ ][^ ]*$" packages | sed "s/ .*//"`
7 if test ! -f $dir/LICENSE
9 echo "Error: $dir/LICENSE doesn't exist." >&2
10 echo "Maybe you haven't done './darcs-all get'?" >&2
15 # autoreconf everything that needs it.
16 for dir in . libraries/*
18 if test -f $dir/configure.ac
21 ( cd $dir && autoreconf )
25 # Alas, darcs doesn't handle file permissions, so fix a few of them.
26 for f in boot darcs-all push-all validate
36 for f in libraries/*; do
38 if test -f $pkgs; then
39 for p in `cat $pkgs`; do
40 libraries="$libraries $f/$p"
43 libraries="$libraries $f"
47 for f in $libraries; do
49 cabals=`echo $f/*.cabal`
50 if test -f $cabals; then
51 echo "Creating $f/ghc.mk"
53 pkg=`echo "$cabals" | sed -e 's#.*/##' -e 's#\.cabal$##'`
54 if test -f $f/ghc-stage; then
55 stage=`cat $f/ghc-stage`
59 top=`echo $f | sed 's#[^/]\+#..#g'`
60 echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk
61 echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk
62 echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk
64 echo "Creating $f/GNUmakefile"
65 echo "dir = ${f}" >> $f/GNUmakefile
66 echo "TOP = ${top}" >> $f/GNUmakefile
67 echo "include \$(TOP)/mk/sub-makefile.mk" >> $f/GNUmakefile