Skip to content
Snippets Groups Projects
Commit 2b373485 authored by td123's avatar td123 Committed by pcapriotti
Browse files

Add --verbose and --help flags to gen_contents_index

parent 0f085f36
No related branches found
No related tags found
No related merge requests found
...@@ -2,13 +2,35 @@ ...@@ -2,13 +2,35 @@
set -e set -e
USAGE="Usage: $0 [--inplace] [--verbose] [--help]"
INPLACE=
VERBOSE=
HADDOCK_ARGS= HADDOCK_ARGS=
[ -d dist-haddock ] || mkdir dist-haddock [ -d dist-haddock ] || mkdir dist-haddock
cd dist-haddock cd dist-haddock
case $* in while [ "$#" -ne "0" ]
--inplace) do
case "$1" in
--inplace)
INPLACE=yes
;;
--verbose)
VERBOSE=yes
;;
--help)
echo "$USAGE"
exit 0
;;
esac
shift
done
if [ -n "$INPLACE" ]
then
HADDOCK=../../inplace/bin/haddock HADDOCK=../../inplace/bin/haddock
for REPO in `grep '^libraries/[^ ]* *- ' ../../packages | sed -e 's#libraries/##' -e 's/ .*//'` for REPO in `grep '^libraries/[^ ]* *- ' ../../packages | sed -e 's#libraries/##' -e 's/ .*//'`
do do
...@@ -35,8 +57,7 @@ case $* in ...@@ -35,8 +57,7 @@ case $* in
fi fi
done done
done done
;; else
*)
HADDOCK=../../../../../../bin/haddock HADDOCK=../../../../../../bin/haddock
# We don't want the GHC API to swamp the index # 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`
...@@ -46,11 +67,13 @@ case $* in ...@@ -46,11 +67,13 @@ case $* in
HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE" HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE"
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG" HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
done done
;; fi
esac
# Now create the combined contents and index pages # Now create the combined contents and index pages
echo $HADDOCK_ARGS if [ -n "$VERBOSE" ]
then
echo $HADDOCK_ARGS
fi
$HADDOCK --gen-index --gen-contents -o . \ $HADDOCK --gen-index --gen-contents -o . \
-t "Haskell Hierarchical Libraries" \ -t "Haskell Hierarchical Libraries" \
-p "../prologue.txt" \ -p "../prologue.txt" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment