summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2010-01-31 16:30:54 -0500
committerWilliam Jon McCann <jmccann@redhat.com>2010-01-31 16:45:01 -0500
commit3a7e52c9b90245ae1266ed02886b7c0acc50c1a2 (patch)
tree27c5e11e262e3fd1856810e2f94a1f3d4185abf5
parent4497c99f858350e81ca2de4e60bd6fcb3d144caa (diff)
downloadlibnotify-3a7e52c9b90245ae1266ed02886b7c0acc50c1a2.tar.gz
[spec] Add html output
-rw-r--r--configure.ac33
-rw-r--r--docs/Makefile.am24
-rw-r--r--docs/config.xsl6
3 files changed, 60 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 81a10ce..701b9b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 75a8079..e3fa5f6 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -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
diff --git a/docs/config.xsl b/docs/config.xsl
new file mode 100644
index 0000000..7aa9def
--- /dev/null
+++ b/docs/config.xsl
@@ -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>