build darcs-style api docs with hoogle

This commit is contained in:
Simon Michael 2008-09-30 23:53:27 +00:00
parent faf97cafe6
commit 3ca87d0486
3 changed files with 36 additions and 6 deletions

View File

@ -52,22 +52,23 @@ docs: haddock-with-source hoogleweb api-doc-frames
api-doc-dir:
mkdir -p api-doc
haddock: api-doc-dir $(MAIN)
api-doc: api-doc-dir $(MAIN)
echo "Generating haddock api docs" ; \
haddock --no-warnings --ignore-all-exports -B `ghc --print-libdir` -o api-doc -h $(filter-out %api-doc-dir,$^) ; \
cp api-doc/index.html api-doc/modules-index.html
haddock-with-source: api-doc-dir colourised-source $(MAIN)
api-doc-with-source: api-doc-dir colourised-source $(MAIN)
echo "Generating haddock api docs" ; \
haddock --no-warnings --ignore-all-exports -B `ghc --print-libdir` -o api-doc -h --source-module=src-%{MODULE/./-}.html --source-entity=src-%{MODULE/./-}.html#%N $(filter-out %api-doc-dir colourised-source,$^) ; \
cp api-doc/index.html api-doc/modules-index.html
# convert haddock output to a rough but useful frame layout. Run after haddock.
# if frames.html includes a hoogle pane, ensure the hoogle cgi is built with base target "main"
api-doc-frames:
# munge haddock and hoogle into a rough but useful framed layout
# ensure that the hoogle cgi is built with base target "main"
api-doc-frames: api-doc-with-source hoogleweb
echo "Converting api docs to frames" ; \
sed -i -e 's%^></HEAD%><base target="main"></HEAD%' api-doc/modules-index.html ; \
cp data/frames.html api-doc/index.html
cp doc/misc/api-doc-frames.html api-doc/index.html ; \
cp doc/misc/hoogle-small.html hoogle
colourised-source: api-doc-dir
echo "Generating colourised source" ; \

View File

@ -0,0 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>hledger api docs</title>
</head>
<frameset cols="30%, 70%">
<frameset rows="90%, 10%">
<frame name="side1" src="modules-index.html">
<frame name="side2" src="../hoogle/hoogle-small.html">
</frameset>
<frame name="main" src="">
<noframes>
<p><a href="modules-index.html">non-frames version</a>
</noframes>
</frameset>
</html>

View File

@ -0,0 +1,11 @@
<html>
<head><base target="main"></head>
<body>
<div id="search" style="whitespace:no-wrap;">
<form action="." method="get">
<input name="hoogle" id="hoogle" type="text" value="" size="25" maxlength="100" />
<input id="submit" type="submit" value="Hoogle" />
</div>
</form>
</body>
</html>