[spec] Add html output

This commit is contained in:
William Jon McCann 2010-01-31 16:30:54 -05:00
parent 4497c99f85
commit 3a7e52c9b9
3 changed files with 60 additions and 3 deletions

View File

@ -118,6 +118,39 @@ dnl # Set up gtk-doc
dnl ################################################################
GTK_DOC_CHECK([1.4])
dnl ---------------------------------------------------------------------------
dnl - DocBook Documentation
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(docbook-docs,
[AC_HELP_STRING([--enable-docbook-docs],
[build documentation (requires xmlto)])],
enable_docbook_docs=$enableval,enable_docbook_docs=no)
AC_PATH_PROG(XMLTO, xmlto, no)
AC_MSG_CHECKING([whether to build DocBook documentation])
if test x$XMLTO = xno ; then
have_docbook=no
else
have_docbook=yes
fi
if test x$enable_docbook_docs = xauto ; then
if test x$have_docbook = xno ; then
enable_docbook_docs=no
else
enable_docbook_docs=yes
fi
fi
if test x$enable_docbook_docs = xyes; then
if test x$have_docbook = xno; then
AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
fi
fi
AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
AC_MSG_RESULT(yes)
AC_ARG_VAR([XMLTO],[Define/override the `xmlto' location.])
AC_ARG_VAR([XMLTO_FLAGS],[Define/override `xmlto' options, like `--skip-validation'.])
# Turn on the additional warnings last

View File

@ -1,7 +1,25 @@
NULL =
SUBDIRS = reference
EXTRA_DIST = \
ChangeLog \
notification-spec.xml
SPEC_XML_FILES = \
notification-spec.xml \
$(NULL)
if DOCBOOK_DOCS_ENABLED
htmldocdir = $(docdir)/spec
htmldoc_DATA = notification-spec.html
notification-spec.html: $(SPEC_XML_FILES)
$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks -m $(top_srcdir)/docs/config.xsl notification-spec.xml
endif # DOCBOOK_DOCS_ENABLED
EXTRA_DIST = \
ChangeLog \
$(SPEC_XML_FILES) \
$(NULL)
-include $(top_srcdir)/git.mk

6
docs/config.xsl Normal file
View File

@ -0,0 +1,6 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:param name="html.stylesheet" select="'docbook.css'"/>
</xsl:stylesheet>