Reinserted the haddock rules into the Makefile.am (they got missed out in the transition from the old build system) and put a warning-check for haddock in the configure.ac file.
This commit is contained in:
parent
1a7d77d9c4
commit
feec33df4a
16
Makefile.am
16
Makefile.am
|
@ -89,3 +89,19 @@ make-cgtests-cpp: tock cgtests/cgtest00.occ clean-cgtests
|
|||
|
||||
clean-cgtests:
|
||||
rm -f cgtests/cgtest??
|
||||
|
||||
#Haddock does allow you to customise the description section of a file, but only with more Haskell comments
|
||||
#Since I want to use an HTML description (with links to SVG using object tags) I have to perform the following hack
|
||||
#to use my own custom HTML description. Fixes to make the hack nicer are welcome :-)
|
||||
|
||||
haddock:
|
||||
@mkdir -p doc
|
||||
@echo "putmycustomdocumentationhere" > .temp-haddock-file
|
||||
haddock -o doc --html -p .temp-haddock-file -t Tock $(filter-out frontends/LexOccam.hs frontends/LexRain.hs,$(sources))
|
||||
cp docextra/*.svg doc/
|
||||
@rm .temp-haddock-file
|
||||
@grep -B 10000 putmycustomdocumentationhere doc/index.html | sed "s/putmycustomdocumentationhere//" > doc/index.html-2
|
||||
@cat docextra/description.html >> doc/index.html-2
|
||||
@grep -A 10000 putmycustomdocumentationhere doc/index.html | tail -n +2 >> doc/index.html-2
|
||||
@rm doc/index.html
|
||||
@mv doc/index.html-2 doc/index.html
|
||||
|
|
|
@ -51,7 +51,12 @@ if test "x$HAVE_SVN" = "xfalse"; then
|
|||
AC_MSG_WARN([svn (Subversion) not found; you will not be able to fetch the occam cgtests from the public repository])
|
||||
fi
|
||||
|
||||
#TODO test that they have the right GHC libraries installed (such as hunit, mtl)
|
||||
AC_CHECK_PROG([HAVE_HADDOCK],[haddock],[true],[false])
|
||||
if test "x$HAVE_HADDOCK" = "xfalse"; then
|
||||
AC_MSG_WARN([haddock not found; you will not be able to generate the documentation from the Tock source code])
|
||||
fi
|
||||
|
||||
#Test that they have the right GHC libraries installed (such as hunit, mtl)
|
||||
|
||||
AC_DEFUN([AC_NEED_HASKELL_LIB],
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue
Block a user