diff options
author | Ian Lynagh <igloo@earth.li> | 2012-01-08 14:43:46 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-01-08 14:43:46 +0000 |
commit | 4c49eb512499255fe7de0e6cfc08ed138957d583 (patch) | |
tree | 8c10a4a5cc9f4c6b96386697be6a88636a3291e6 /libraries/gen_contents_index | |
parent | c2a840ed2a439391c1a0e62f62a5c714422d4672 (diff) | |
download | haskell-4c49eb512499255fe7de0e6cfc08ed138957d583.tar.gz |
Generate the haddock contents/index pages in a dist-haddock subdirectory
This is tidier, and makes it easier to clean and install them correctly
Diffstat (limited to 'libraries/gen_contents_index')
-rw-r--r-- | libraries/gen_contents_index | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index c8d82c8da6..b9aaa93e72 100644 --- a/libraries/gen_contents_index +++ b/libraries/gen_contents_index @@ -4,18 +4,21 @@ set -e HADDOCK_ARGS= +[ -d dist-haddock ] || mkdir dist-haddock +cd dist-haddock + case $* in --inplace) - HADDOCK=../inplace/bin/haddock - for REPO in `grep '^libraries/[^ ]* *- ' ../packages | sed -e 's#libraries/##' -e 's/ .*//'` + HADDOCK=../../inplace/bin/haddock + for REPO in `grep '^libraries/[^ ]* *- ' ../../packages | sed -e 's#libraries/##' -e 's/ .*//'` do - if [ -f "$REPO/ghc-packages" ] + if [ -f "../$REPO/ghc-packages" ] then - LIBS="`cat $REPO/ghc-packages`" - LIBROOT="$REPO" + LIBS="`cat ../$REPO/ghc-packages`" + LIBROOT="../$REPO" else LIBS="$REPO" - LIBROOT="." + LIBROOT=".." fi for LIB in $LIBS do @@ -34,9 +37,9 @@ case $* in done ;; *) - HADDOCK=../../../../../bin/haddock + HADDOCK=../../../../../../bin/haddock # We don't want the GHC API to swamp the index - HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort` + HADDOCK_FILES=`ls -1 ../*/*.haddock | grep -v '/ghc\.haddock' | sort` for HADDOCK_FILE in $HADDOCK_FILES do NAME_VERSION=`echo "$HADDOCK_FILE" | sed 's#/.*##'` @@ -50,7 +53,7 @@ esac echo $HADDOCK_ARGS $HADDOCK --gen-index --gen-contents -o . \ -t "Haskell Hierarchical Libraries" \ - -p "prologue.txt" \ + -p "../prologue.txt" \ $HADDOCK_ARGS # Unhandled Windows help stuff?: |