6 for f in libraries/*; do
9 for p in `cat $pkgs`; do
10 libraries="$libraries $f/$p"
13 libraries="$libraries $f"
17 for f in $libraries; do
19 cabals=`echo $f/*.cabal`
20 if test -f $cabals; then
21 echo "Creating $f/ghc.mk"
23 pkg=`echo "$cabals" | sed -e 's#.*/##' -e 's#\.cabal$##'`
24 if test -f $f/ghc-stage; then
25 stage=`cat $f/ghc-stage`
29 top=`echo $f | sed 's#[^/]\+#..#g'`
30 echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk
31 echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk
32 echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk
34 echo "Creating $f/GNUmakefile"
35 echo "dir = ${f}" >> $f/GNUmakefile
36 echo "TOP = ${top}" >> $f/GNUmakefile
37 echo "include \$(TOP)/mk/sub-makefile.mk" >> $f/GNUmakefile