From 3a7e52c9b90245ae1266ed02886b7c0acc50c1a2 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Sun, 31 Jan 2010 16:30:54 -0500 Subject: [spec] Add html output --- configure.ac | 33 +++++++++++++++++++++++++++++++++ docs/Makefile.am | 24 +++++++++++++++++++++--- docs/config.xsl | 6 ++++++ 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 docs/config.xsl 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 @@ + + + + -- cgit v1.2.1