summaryrefslogtreecommitdiff
path: root/libraries/gen_contents_index
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-12-07 18:35:38 +0000
committerIan Lynagh <igloo@earth.li>2007-12-07 18:35:38 +0000
commit2e7c7daef4a122f7b9d96bde5e048ef7ce0bff97 (patch)
treea90b45698f7a8566551da4ec44e23b84ebfa6a89 /libraries/gen_contents_index
parentbd3c90b1ae22f70125e4ec8238f830f88c2c607a (diff)
downloadhaskell-2e7c7daef4a122f7b9d96bde5e048ef7ce0bff97.tar.gz
Refactor gen_contents_index
Also fixes it with Solaris's sh, spotted by Christian Maeder
Diffstat (limited to 'libraries/gen_contents_index')
-rw-r--r--libraries/gen_contents_index25
1 files changed, 8 insertions, 17 deletions
diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index
index de20186d89..5cee6e3c5f 100644
--- a/libraries/gen_contents_index
+++ b/libraries/gen_contents_index
@@ -7,29 +7,20 @@ NAMES=
case $* in
--inplace)
- GHC_PKG=../utils/ghc-pkg/ghc-pkg-inplace
- for DIR in */
- do
- NAME=`echo "$DIR" | sed 's#/$##'`
- HADDOCK_FILE=$NAME/dist/doc/html/$NAME/$NAME.haddock
- if [ -f $HADDOCK_FILE ]
- then
- HADDOCK_ARGS="$HADDOCK_ARGS --read-interface=$NAME,$HADDOCK_FILE"
- NAMES="$NAMES $NAME"
- fi
- done
+ HADDOCK_FILES=`ls -1 */dist/doc/html/*/*.haddock | sort`
;;
*)
HADDOCK_FILES=`ls -1 */*.haddock | sort`
- for HADDOCK_FILE in $HADDOCK_FILES
- do
- NAME=`echo "$HADDOCK_FILE" | sed "s#/.*##"`
- HADDOCK_ARGS="$HADDOCK_ARGS --read-interface=$NAME,$HADDOCK_FILE"
- NAMES="$NAMES $NAME"
- done
;;
esac
+for HADDOCK_FILE in $HADDOCK_FILES
+do
+ NAME=`echo "$DIR" | sed 's#/.*##'`
+ HADDOCK_ARGS="$HADDOCK_ARGS --read-interface=$NAME,$HADDOCK_FILE"
+ NAMES="$NAMES $NAME"
+done
+
# Now create the combined contents and index pages
haddock --gen-index --gen-contents -o . \
-t "Haskell Hierarchical Libraries" \