Skip to content

Commit

Permalink
Set up gtkdoc for razor.
Browse files Browse the repository at this point in the history
Despite its name, gtkdoc doesn't require gtk+ and is a nice way to
generate DocBook format API documentation.
  • Loading branch information
Kristian Høgsberg committed Jun 23, 2008
1 parent ef514b2 commit 13de660
Show file tree
Hide file tree
Showing 8 changed files with 326 additions and 26 deletions.
2 changes: 2 additions & 0 deletions autogen.sh
Expand Up @@ -84,6 +84,8 @@ esac

intltoolize --copy --force --automake || exit 1

gtkdocize --copy --flavour no-tmpl

conf_flags="--enable-maintainer-mode"

if test x$NOCONFIGURE = x; then
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Expand Up @@ -168,13 +168,16 @@ AC_SUBST([GETTEXT_PACKAGE])
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])

GTK_DOC_CHECK([1.9])

AC_OUTPUT([
Makefile
data/razor.pc
data/Makefile
librazor/Makefile
src/Makefile
docs/Makefile
docs/version.xml
po/Makefile.in
])

Expand Down
30 changes: 30 additions & 0 deletions docs/Makefile.am
@@ -1,3 +1,33 @@
# The name of the module.
DOC_MODULE=razor

# The top-level SGML file.
DOC_MAIN_SGML_FILE=razor-docs.xml

# Extra options to supply to gtkdoc-scan
IGNORE_HFILES = config.h razor-internal.h

# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=$(top_srcdir)/librazor

# Used for dependencies
HFILE_GLOB=$(top_srcdir)/librazor/*.h
CFILE_GLOB=$(top_srcdir)/librazor/*.c

# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml

# Extra options to supply to gtkdoc-mktmpl
MKTMPL_OPTIONS=

if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
else
EXTRA_DIST =
endif

# Version information for marking the documentation
EXTRA_DIST += version.xml.in

docsdir = $(datadir)/doc/razor
dist_docs_DATA = \
Expand Down
85 changes: 85 additions & 0 deletions docs/razor-docs.xml
@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>Razor Library Reference Manual</title>
<releaseinfo>Version &version;</releaseinfo>
<authorgroup>
<author>
<firstname>Kristian</firstname>
<surname>Høgsberg</surname>
<affiliation>
<address>
<email>krh@redhat.com</email>
</address>
</affiliation>
</author>
</authorgroup>

<copyright>
<year>2008</year>
<holder>Razor Authors</holder>
</copyright>

<copyright>
<year>2008</year>
<holder>Red Hat, Inc</holder>
</copyright>

<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the <citetitle>GNU Free
Documentation License</citetitle>, Version 1.1 or any later
version published by the Free Software Foundation with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. You may obtain a copy of the <citetitle>GNU Free
Documentation License</citetitle> from the Free Software
Foundation by visiting <ulink type="http"
url="http://www.fsf.org">their Web site</ulink> or by writing
to:

<address>
The Free Software Foundation, Inc.,
<street>59 Temple Place</street> - Suite 330,
<city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>,
<country>USA</country>
</address>
</para>
</legalnotice>
</bookinfo>

<reference id="ref-design">
<title>Design Overview</title>
<partintro>
<para>
This part presents the design documentation for razor.
</para>
</partintro>
</reference>

<reference id="ref-core">
<title>Core API Reference</title>
<partintro>
<para>
This part presents the class and function reference for the
core razor library.
</para>
</partintro>
<xi:include href="xml/set.xml"/>
<xi:include href="xml/importer.xml"/>
<xi:include href="xml/iterator.xml"/>
<xi:include href="xml/transaction.xml"/>
<xi:include href="xml/rpm.xml"/>
<xi:include href="xml/root.xml"/>
<xi:include href="xml/misc.xml"/>
</reference>

<index>
<title>Index</title>
</index>

</book>
100 changes: 100 additions & 0 deletions docs/razor-sections.txt
@@ -0,0 +1,100 @@
<SECTION>
<FILE>set</FILE>
razor_set
razor_set_create
razor_set_open
razor_set_destroy
razor_set_write_to_fd
razor_set_write
razor_set_open_details
razor_set_open_files
razor_set_get_package
razor_set_list_files
razor_set_list_package_files
razor_set_list_unsatisfied
razor_set_create_from_yum
razor_set_create_from_rpmdb
razor_diff_callback_t
razor_set_diff
razor_set_create_remove_iterator
razor_set_create_install_iterator
</SECTION>

<SECTION>
<FILE>transaction</FILE>
razor_transaction_create
razor_transaction_install_package
razor_transaction_remove_package
razor_transaction_update_package
razor_transaction_update_all
razor_transaction_resolve
razor_transaction_describe
razor_transaction_finish
razor_transaction_destroy
razor_transaction_unsatisfied_property
</SECTION>

<SECTION>
<FILE>importer</FILE>
razor_importer
razor_importer_create
razor_importer_destroy
razor_importer_begin_package
razor_importer_add_details
razor_importer_add_property
razor_importer_add_file
razor_importer_finish_package
razor_importer_add_rpm
razor_importer_finish
</SECTION>

<SECTION>
<FILE>rpm</FILE>
razor_rpm
razor_rpm_open
razor_rpm_install
razor_rpm_close
</SECTION>

<SECTION>
<FILE>root</FILE>
razor_root
razor_root_create
razor_root_open
razor_root_open_read_only
razor_root_get_system_set
razor_root_close
razor_root_update
razor_root_commit
</SECTION>

<SECTION>
<FILE>iterator</FILE>
razor_package_iterator
razor_package_iterator_create
razor_package_iterator_create_for_property
razor_package_iterator_create_for_file
razor_package_iterator_next
razor_package_iterator_destroy
razor_package_query_create
razor_package_query_add_package
razor_package_query_add_iterator
razor_package_query_finish
razor_property_iterator
razor_property_iterator_create
razor_property_iterator_next
razor_property_iterator_destroy
</SECTION>

<SECTION>
<FILE>misc</FILE>
razor_package
razor_package_get_details

razor_property
razor_property_relation_to_string
razor_property_type_to_string

razor_build_evr
razor_versioncmp
</SECTION>
1 change: 1 addition & 0 deletions docs/version.xml.in
@@ -0,0 +1 @@
@VERSION@
1 change: 1 addition & 0 deletions librazor/razor.c
Expand Up @@ -64,6 +64,7 @@ struct razor_set_section razor_files_sections[] = {
struct razor_set_section razor_details_sections[] = {
{ RAZOR_DETAILS_STRING_POOL, offsetof(struct razor_set, details_string_pool) },
};

struct razor_set *
razor_set_create(void)
{
Expand Down

0 comments on commit 13de660

Please sign in to comment.