6 tarred=`ls -1 libraries/tarballs | sed "s/-[0-9.]*\(-snapshot\)\{0,1\}.tar.gz//"`
10 libraries="$libraries libraries/$p"
11 if [ -d "libraries/$p/_darcs" ]
13 echo Ignoring libraries/$p as it looks like a darcs checkout
15 tarball=libraries/tarballs/$p-*.tar.gz
16 stamp="libraries/stamp/$p"
17 if [ ! -d "libraries/$p" ] ||
19 [ "libraries/stamp/$p" -ot $tarball ]
25 tar -zxf ../../$tarball
33 for f in libraries/*; do
35 if test -f $pkgs; then
36 for p in `cat $pkgs`; do
37 libraries="$libraries $f/$p"
40 libraries="$libraries $f"
44 for f in $libraries; do
46 cabals=`echo $f/*.cabal`
47 if test -f $cabals; then
48 echo "Creating $f/ghc.mk"
50 pkg=`echo "$cabals" | sed -e 's#.*/##' -e 's#\.cabal$##'`
51 if test -f $f/ghc-stage; then
52 stage=`cat $f/ghc-stage`
56 top=`echo $f | sed 's#[^/][^/]*#..#g'`
57 echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk
58 echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk
59 echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk
61 echo "Creating $f/GNUmakefile"
62 echo "dir = ${f}" >> $f/GNUmakefile
63 echo "TOP = ${top}" >> $f/GNUmakefile
64 echo "include \$(TOP)/mk/sub-makefile.mk" >> $f/GNUmakefile