Commit 16179246 authored by Matthias Clasen's avatar Matthias Clasen

Add doc build infrastructure

parent 4716c8bd
SUBDIRS = src data po
SUBDIRS = src data po doc
ACLOCAL_AMFLAGS = -I m4
......
......@@ -28,11 +28,62 @@ GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_MAINTAINER_MODE_DEFINES
nl ---------------------------------------------------------------------------
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'.])
dnl ---------------------------------------------------------------------------
dnl Check for xsltproc
dnl ---------------------------------------------------------------------------
AC_PATH_PROG([XSLTPROC], [xsltproc])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
data/Makefile
src/Makefile
doc/Makefile
doc/dbus/Makefile
doc/dbus/AccountsService.xml
])
AC_OUTPUT
echo
AC_MSG_NOTICE([accountsservice was configured with the following options:])
if test "x$enable_docbook_docs" = "xyes"; then
AC_MSG_NOTICE([** DocBook documentation build enabled])
else
AC_MSG_NOTICE([** DocBook documentation build disabled])
fi
echo
SUBDIRS = dbus
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY dbus-Accounts SYSTEM "@srcdir@/org.freedesktop.Accounts.ref.xml">
<!ENTITY dbus-User SYSTEM "@srcdir@/org.freedesktop.Accounts.User.ref.xml">
]>
<book id="index">
<bookinfo>
<title>AccountsService @VERSION@ Documentation</title>
<releaseinfo>Version @VERSION@</releaseinfo>
<authorgroup>
<author>
<firstname>Matthias</firstname>
<surname>Clasen</surname>
<affiliation>
<address>
<email>mclasen@redhat.com</email>
</address>
</affiliation>
</author>
</authorgroup>
</bookinfo>
<!--
<preface>
<title>Introduction</title>
<para>
</para>
</preface>
<part>
<title>Concepts</title>
<para>
</para>
</part>
-->
<part>
<title>Reference</title>
<reference id="dbus-reference">
<title>D-Bus API Reference</title>
<partintro>
<para>
The AccountsService provides a D-Bus API for programs to obtain
information about user accounts that are present on a system.
</para>
<para>
Please see the other sections of this manual for an introduction to
these concepts.
</para>
<para>
This API is not yet stable and is likely to change in the future.
</para>
</partintro>
&dbus-Accounts;
&dbus-User;
</reference>
</part>
<index>
<title>Index</title>
</index>
</book>
NULL =
SPEC_XML_FILES = \
AccountsService.xml \
org.freedesktop.Accounts.ref.xml \
org.freedesktop.Accounts.User.ref.xml \
$(NULL)
if DOCBOOK_DOCS_ENABLED
htmldocdir = $(docdir)/spec
htmldoc_DATA = AccountsService.html
AccountsService.html : $(SPEC_XML_FILES)
$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl AccountsService.xml
endif # DOCBOOK_DOCS_ENABLED
org.freedesktop.Accounts.ref.xml : $(top_srcdir)/data/org.freedesktop.Accounts.xml spec-to-docbook.xsl
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 > $@
org.freedesktop.Accounts.User.ref.xml : $(top_srcdir)/data/org.freedesktop.Accounts.User.xml spec-to-docbook.xsl
$(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 > $@
EXTRA_DIST = \
spec-to-docbook.xsl \
AccountsService.xml.in \
config.xsl \
docbook.css \
dbus-introspect-docs.dtd \
$(SPEC_XML_FILES)
$(NULL)
MAINTAINERCLEANFILES = \
*~ \
Makefile.in \
$(NULL)
clean-local:
rm -f *~ *.ref.xml
rm -f AccountsService.html
check-local:
xmllint --noout --noent --valid AccountsService.xml
<?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>
<!-- DTD for D-Bus Introspection Documentation -->
<!ELEMENT doc (summary?,description?,errors?,permission?,since?,deprecated,seealso?)>
<!ELEMENT summary (#PCDATA|ref)*>
<!ELEMENT description (#PCDATA|para|example)*>
<!ELEMENT errors (error)*>
<!ELEMENT permission (#PCDATA|ref|para)*>
<!ELEMENT since EMPTY>
<!ATTLIST since version CDATA #REQUIRED>
<!ELEMENT deprecated (#PCDATA|ref)>
<!ATTLIST deprecated version CDATA #REQUIRED>
<!ATTLIST deprecated instead CDATA #REQUIRED>
<!ELEMENT seealso (ref+)>
<!ELEMENT error (#PCDATA|para)*>
<!ATTLIST error name CDATA #REQUIRED>
<!ELEMENT para (#PCDATA|example|code|list|ref)*>
<!ELEMENT example (#PCDATA|para|code|ref)*>
<!ATTLIST language (c|glib|python|shell) #REQUIRED>
<!ATTLIST title CDATA #IMPLIED>
<!ELEMENT list (item*)>
<!ATTLIST list type (bullet|number) #REQUIRED>
<!ELEMENT item (term|definition)*>
<!ELEMENT term (#PCDATA|ref)*>
<!ELEMENT definition (#PCDATA|para)*>
<!ELEMENT code (#PCDATA)>
<!ATTLIST code lang CDATA #IMPLIED>
<!ELEMENT ref CDATA>
<!ATTLIST ref type (parameter|arg|signal|method|interface) #REQUIRED>
<!ATTLIST ref to CDATA #REQUIRED>
body
{
font-family: sans-serif;
}
h1.title
{
}
.permission
{
color: #ee0000;
text-decoration: underline;
}
.synopsis, .classsynopsis
{
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting
{
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist
{
padding: 4px;
margin-left: 3em;
}
.variablelist td:first-child
{
vertical-align: top;
}
td.shortcuts
{
color: #770000;
font-size: 80%;
}
div.refnamediv
{
margin-top: 2em;
}
div.toc
{
border: 2em;
}
a
{
text-decoration: none;
}
a:hover
{
text-decoration: underline;
color: #FF0000;
}
div.table table
{
border-collapse: collapse;
border-spacing: 0px;
border-style: solid;
border-color: #777777;
border-width: 1px;
}
div.table table td, div.table table th
{
border-style: solid;
border-color: #777777;
border-width: 1px;
padding: 3px;
vertical-align: top;
}
div.table table th
{
background-color: #eeeeee;
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment