Initial documentation infrastructure import
authorDidier 'Ptitjes <ptitjes@free.fr>
Fri, 4 Sep 2009 00:44:48 +0000 (02:44 +0200)
committerDidier 'Ptitjes <ptitjes@free.fr>
Fri, 4 Sep 2009 08:35:26 +0000 (10:35 +0200)
Makefile.am
configure.ac
doc/Makefile.am [new file with mode: 0644]
doc/index.wiki [new file with mode: 0644]

index 063ccf1..610b9ba 100644 (file)
@@ -1,10 +1,16 @@
 include $(top_srcdir)/Makefile.decl
-
 NULL =
 
+if ENABLE_DOC
+DOC_SUBDIR = \
+       doc \
+       $(NULL)
+endif
+
 SUBDIRS = \
        gee \
        tests \
+       $(DOC_SUBDIR) \
        $(NULL)
 
 pkgconfigdir = $(libdir)/pkgconfig
index c52fda2..404a3f6 100644 (file)
@@ -16,6 +16,15 @@ AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
 
+AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc], [Enable documentation generation]), enable_doc=$enableval, enable_doc=no)
+AM_CONDITIONAL(ENABLE_DOC, test x$enable_doc = xyes)
+
+AS_IF([test "x$enable_doc" != xno],
+       [AC_PATH_PROG(VALADOC, valadoc, :)
+        AC_SUBST(VALADOC)
+        AS_IF([test "$VALADOC" = :],
+               [AC_MSG_ERROR([valadoc not found])])])
+
 GLIB_REQUIRED=2.12.0
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
@@ -24,6 +33,7 @@ AC_SUBST(GLIB_LIBS)
 
 AC_CONFIG_FILES([Makefile
            gee-1.0.pc
+           doc/Makefile
            gee/Makefile
            tests/Makefile])
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..bce1117
--- /dev/null
@@ -0,0 +1,37 @@
+include $(top_srcdir)/Makefile.decl
+
+NULL =
+
+SRC_DIR = $(top_srcdir)/gee
+
+docdir=$(datadir)/devhelp/references/gee-1.0
+innerdocdir=$(datadir)/devhelp/references/gee-1.0/gee-1.0
+imgdir=$(datadir)/devhelp/references/gee-1.0/gee-1.0/img
+
+doc_data = \
+       gee-1.0/*.css \
+       gee-1.0/*.png \
+       $(NULL)
+
+doc_DATA = \
+       gee-1.0/index.html \
+       $(doc_data) \
+       $(NULL)
+
+innerdoc_DATA = \
+       gee-1.0/gee-1.0/index.htm \
+       gee-1.0/gee-1.0/*.html \
+       $(NULL)
+
+img_DATA = \
+       gee-1.0/gee-1.0/img/*.png \
+       $(NULL)
+
+$(doc_data) $(innerdoc_DATA) $(img_DATA): gee-1.0/index.html
+
+gee-1.0/index.html:
+       $(VALADOC) -o gee-1.0/ --wiki ./ --force -b $(top_srcdir) $(SRC_DIR)/*.vala
+
+EXTRA_DIST += \
+       index.wiki \
+       $(NULL)
\ No newline at end of file
diff --git a/doc/index.wiki b/doc/index.wiki
new file mode 100644 (file)
index 0000000..8f67685
--- /dev/null
@@ -0,0 +1,9 @@
+libgee is a collection library providing GObject-based interfaces and classes for commonly used data structures.
+
+libgee provides the following interfaces:
+ * Iterable
+   - Collection
+     - List
+     - Set
+   - Iterator
+   - Map