# HG changeset patch # User Will Thompson # Date 1192290283 0 # Node ID f34539eb7a611254fe0334305c036e2b45252c09 # Parent 54d232b52607a8b5057b6a2347582a6b59d70052 Add some xsl magic to generate a .devhelp index from doxygen's XML output, allowing the documentation to be viewed in Devhelp. It's not perfect --- there are some broken links and the transformation is a bit fragile --- but works well enough to be useful. diff -r 54d232b52607 -r f34539eb7a61 Doxyfile.in --- a/Doxyfile.in Fri Oct 12 22:26:44 2007 +0000 +++ b/Doxyfile.in Sat Oct 13 15:44:43 2007 +0000 @@ -858,7 +858,7 @@ # feature is still experimental and incomplete at the # moment. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be diff -r 54d232b52607 -r f34539eb7a61 Makefile.am --- a/Makefile.am Fri Oct 12 22:26:44 2007 +0000 +++ b/Makefile.am Sat Oct 13 15:44:43 2007 +0000 @@ -48,6 +48,13 @@ if HAVE_DOXYGEN @echo "Running doxygen..." @doxygen +if HAVE_XSLTPROC + @echo "Generating devhelp index..." + @xsltproc doxy2devhelp.xsl doc/xml/index.xml > doc/html/pidgin.devhelp + @echo "(Symlink doc/html to ~/.local/share/gtk-doc/html/pidgin to make devhelp see the documentation)" +else + @echo "Not generating devhelp index: xsltproc was not found by configure" +endif else @echo "doxygen was not found during configure. Aborting." @echo; diff -r 54d232b52607 -r f34539eb7a61 configure.ac --- a/configure.ac Fri Oct 12 22:26:44 2007 +0000 +++ b/configure.ac Sat Oct 13 15:44:43 2007 +0000 @@ -2101,6 +2101,10 @@ [AC_HELP_STRING([--enable-dot], [enable graphs in doxygen via 'dot'])], enable_dot="$enableval", enable_dot="yes") +AC_ARG_ENABLE(devhelp, + [AC_HELP_STRING([--enable-devhelp], + [enable building index for devhelp documentation browser])], + enable_devhelp="$enableval", enable_devhelp="yes") if test "x$enable_doxygen" = xyes; then AC_CHECK_PROG(DOXYGEN, doxygen, true, false) @@ -2120,14 +2124,28 @@ AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot]) fi fi + + if test "x$enable_devhelp" = "xyes"; then + AC_CHECK_PROG(XSLTPROC, xsltproc, true, false) + + if test $XSLTPROC = false; then + enable_devhelp="no"; + AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created]) + else + AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index]) + fi + fi fi else enable_dot="no" + enable_devhelp="no" fi AC_SUBST(enable_doxygen) AC_SUBST(enable_dot) +AC_SUBST(enable_devhelp) AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes") +AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes") AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) diff -r 54d232b52607 -r f34539eb7a61 doxy2devhelp.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doxy2devhelp.xsl Sat Oct 13 15:44:43 2007 +0000 @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .html + + + + + + + + + + + + + + + + .html# + + + + + + + + + + + .html# + + + +