9 HADDOCK=../inplace/bin/haddock
10 HADDOCK_FILES1=`ls -1 */dist-install/doc/html/*/*.haddock | sort`
11 HADDOCK_FILES2=`ls -1 dph/*/dist-install/doc/html/*/*.haddock | sort`
12 HADDOCK_FILES="$HADDOCK_FILES1 $HADDOCK_FILES2"
13 for HADDOCK_FILE in $HADDOCK_FILES
15 LIBPATH=`echo "$HADDOCK_FILE" | sed 's#/dist-install.*##'`
16 NAME=`echo "$HADDOCK_FILE" | sed 's#.*/##' | sed 's#\.haddock$##'`
17 # It's easier to portably remove tabs with tr than to try to get
18 # sed to do what we want
19 VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*://' | tr -d ' \t'`
20 HADDOCK_ARG="--read-interface=${NAME}-${VERSION},$HADDOCK_FILE"
21 HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
25 HADDOCK=../../../../../bin/haddock
26 # We don't want the GHC API to swamp the index
27 HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`
28 for HADDOCK_FILE in $HADDOCK_FILES
30 NAME_VERSION=`echo "$HADDOCK_FILE" | sed 's#/.*##'`
31 HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE"
32 HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
37 # Now create the combined contents and index pages
38 $HADDOCK --gen-index --gen-contents -o . \
39 -t "Haskell Hierarchical Libraries" \
43 # Unhandled Windows help stuff?:
45 #libraries.HxS : libraries.txt
49 # ( cd $(HTML_DIR) && if Hxcomp -p libraries.HxC -o ../$@ ; then false ; else true ; fi ) || true
51 #libraries.chm : libraries.txt
54 # --html-help=mshelp \
55 # ( cd $(HTML_DIR) && if hhc libraries.hhp ; then false ; else true ; fi && mv libraries.chm .. ) || true