[nautilus-sendto] Add gtk-doc support



commit 3bb763ca90af0fe7581f83e415faaef94f69929d
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 23 11:52:39 2009 +0100

    Add gtk-doc support
    
    gtk-doc support for documenting the plugins API.

 Makefile.am                                    |    2 +-
 configure.in                                   |    9 ++-
 docs/Makefile.am                               |    1 +
 docs/nautilus-sendto/Makefile.am               |   94 ++++++++++++++++++++++++
 docs/nautilus-sendto/nautilus-sendto-docs.sgml |   33 ++++++++
 docs/nautilus-sendto/version.xml.in            |    1 +
 src/Makefile.am                                |   16 ++--
 src/nautilus-sendto-command.c                  |    3 +
 src/nautilus-sendto-plugin.h                   |    4 -
 9 files changed, 148 insertions(+), 15 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index cc4f35b..0713804 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ if HAVE_EVOLUTION
 EVOLUTION_PLUGIN_DIR=evolution
 endif
 
-SUBDIRS = src $(GAIM_PLUGIN_DIR) $(PIDGIN_PLUGIN_DIR) $(EVOLUTION_PLUGIN_DIR) po
+SUBDIRS = src $(GAIM_PLUGIN_DIR) $(PIDGIN_PLUGIN_DIR) $(EVOLUTION_PLUGIN_DIR) docs po
 
 DIST_SUBDIRS = pidgin_plugin evolution src po
 
diff --git a/configure.in b/configure.in
index 2b8c94c..ae13195 100644
--- a/configure.in
+++ b/configure.in
@@ -16,6 +16,9 @@ AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
+dnl gtk-doc checks
+GTK_DOC_CHECK(1.9)
+
 GNOME_COMMON_INIT
 GNOME_DEBUG_CHECK
 GNOME_COMPILE_WARNINGS([maximum])
@@ -74,9 +77,6 @@ PKG_CHECK_MODULES(EVOLUTION, evolution-plugin < 2.27.1,
 		  enable_evo=yes, enable_evo=no)
 AM_CONDITIONAL(HAVE_EVOLUTION, test "x$enable_evo" = "xyes")
 
-SOEXT=".so"
-AC_SUBST(SOEXT)
-
 plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin`
 AC_SUBST(plugindir)
 
@@ -291,6 +291,9 @@ src/plugins/nautilus-burn/Makefile
 src/plugins/pidgin/Makefile
 src/plugins/removable-devices/Makefile
 src/plugins/upnp/Makefile
+docs/Makefile
+docs/nautilus-sendto/Makefile
+docs/nautilus-sendto/version.xml
 evolution/Makefile
 pidgin_plugin/Makefile
 po/Makefile.in
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..ec2345e
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = nautilus-sendto
diff --git a/docs/nautilus-sendto/Makefile.am b/docs/nautilus-sendto/Makefile.am
new file mode 100644
index 0000000..c898040
--- /dev/null
+++ b/docs/nautilus-sendto/Makefile.am
@@ -0,0 +1,94 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=nautilus-sendto
+
+# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
+#DOC_MODULE_VERSION=2
+
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR=../../src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkhtml
+MKHTML_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/src/*.h
+CFILE_GLOB=$(top_srcdir)/src/*.c
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES=nautilus-nste.h bluetooth-marshal.h e-contact-entry.h econtactentry-marshal.h nst-common.h
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files=version.xml
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+GTKDOC_CFLAGS=$(NAUTILUS_SENDTO_CFLAGS)
+GTKDOC_LIBS=$(top_builddir)/src/libnstplugin.la
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST += version.xml.in
+
+# Files not to distribute
+# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
+# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
+#DISTCLEANFILES +=
+
+# Comment this out if you want your docs-status tested during 'make check'
+#TESTS = $(GTKDOC_CHECK)
+
diff --git a/docs/nautilus-sendto/nautilus-sendto-docs.sgml b/docs/nautilus-sendto/nautilus-sendto-docs.sgml
new file mode 100644
index 0000000..3b8f35c
--- /dev/null
+++ b/docs/nautilus-sendto/nautilus-sendto-docs.sgml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
+[
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<book id="index">
+  <bookinfo>
+    <title>nautilus-sendto Reference Manual</title>
+    <releaseinfo>
+      for nautilus-sendto &version;
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" url="http://library.gnome.org/devel/nautilus-sendto/index.html";>http://library.gnome.org/devel/nautilus-sendto/index.html</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>nautilus-sendto documentation</title>
+    <xi:include href="xml/nautilus-sendto-plugin.xml"/>
+
+  </chapter>
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+     <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+  </index>
+
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/nautilus-sendto/version.xml.in b/docs/nautilus-sendto/version.xml.in
new file mode 100644
index 0000000..d78bda9
--- /dev/null
+++ b/docs/nautilus-sendto/version.xml.in
@@ -0,0 +1 @@
+ VERSION@
diff --git a/src/Makefile.am b/src/Makefile.am
index 005457b..3fc885e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,18 +14,20 @@ INCLUDES =					\
 ui_DATA = nautilus-sendto.ui
 uidir = $(datadir)/nautilus-sendto/ui
 
-bin_PROGRAMS = nautilus-sendto
-
-nautilus_sendto_SOURCES =			\
-	nautilus-sendto-command.c		\
+noinst_LTLIBRARIES = libnstplugin.la
+libnstplugin_la_SOURCES =			\
 	nautilus-sendto-plugin.h		\
 	nst-enum-types.c			\
 	nst-enum-types.h
+libnstplugin_la_LIBADD = $(NAUTILUS_SENDTO_LIBS)
+
+bin_PROGRAMS = nautilus-sendto
 
-nautilus_sendto_LDADD = $(NAUTILUS_SENDTO_LIBS)
+nautilus_sendto_SOURCES = nautilus-sendto-command.c
+nautilus_sendto_LDADD = $(NAUTILUS_SENDTO_LIBS) libnstplugin.la
 
-nautilus_extensiondir=$(NAUTILUS_EXTENSION_DIR)
-nautilus_extension_LTLIBRARIES=libnautilus-sendto.la
+nautilus_extensiondir = $(NAUTILUS_EXTENSION_DIR)
+nautilus_extension_LTLIBRARIES = libnautilus-sendto.la
 libnautilus_sendto_la_SOURCES =		\
 	nautilus-nste.c			\
 	nautilus-nste.h			\
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index 84f120f..fb493e5 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -38,6 +38,9 @@
 #define UNINSTALLED_PLUGINDIR "plugins/removable-devices"
 #define UNINSTALLED_SOURCE "nautilus-sendto-command.c"
 
+#define SOEXT           ("." G_MODULE_SUFFIX)
+#define SOEXT_LEN       (strlen (SOEXT))
+
 enum {
 	COLUMN_ICON,
 	COLUMN_DESCRIPTION,
diff --git a/src/nautilus-sendto-plugin.h b/src/nautilus-sendto-plugin.h
index 89407d0..f2f67e0 100644
--- a/src/nautilus-sendto-plugin.h
+++ b/src/nautilus-sendto-plugin.h
@@ -65,9 +65,5 @@ struct _NstPlugin
                 return TRUE;						\
         }	
 
-#define SOEXT           ("." G_MODULE_SUFFIX)
-#define SOEXT_LEN       (strlen (SOEXT))
-
-
 #endif /* _NAUTILUS_SENDTO_PLUGIN_H_ */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]