X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=boot-pkgs;h=31ad53c5166e989669bff62ab02ad31a7bd1a86c;hp=4892b520546ab16d13c295f3934a14d5f0dd5142;hb=2fe38b5fb0957f9428864afd69ad3ccd82fae3d0;hpb=11e3da87d34465406147927fd89fb64b147cfaca diff --git a/boot-pkgs b/boot-pkgs index 4892b52..31ad53c 100644 --- a/boot-pkgs +++ b/boot-pkgs @@ -3,6 +3,33 @@ set -e libraries= +tarred=`ls -1 libraries/tarballs | sed "s/-[0-9.]*\(-snapshot\)\{0,1\}.tar.gz//"` + +for p in $tarred +do + libraries="$libraries libraries/$p" + if [ -d "libraries/$p/_darcs" ] + then + echo Ignoring libraries/$p as it looks like a darcs checkout + else + tarball=libraries/tarballs/$p-*.tar.gz + stamp="libraries/stamp/$p" + if [ ! -d "libraries/$p" ] || + [ ! -f "$stamp" ] || + [ "libraries/stamp/$p" -ot $tarball ] + then + rm -rf "libraries/$p" + mkdir "libraries/$p" + ( + cd "libraries/$p" + tar -zxf ../../$tarball + mv */* . + ) + touch "$stamp" + fi + fi +done + for f in libraries/*; do pkgs=$f/ghc-packages if test -f $pkgs; then @@ -26,7 +53,7 @@ for f in $libraries; do else stage=1 fi - top=`echo $f | sed 's#[^/]\+#..#g'` + top=`echo $f | sed 's#[^/][^/]*#..#g'` echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk