[Pkg-privacy-commits] [libgsecuredelete] 75/168: Build and install the documentation
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 20:06:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository libgsecuredelete.
commit b6e317f7ae1d0668cfe37fbf7e7334e23e18b7a8
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Fri Apr 29 22:30:47 2011 +0200
Build and install the documentation
---
.gitignore | 10 +++++--
Makefile.am | 2 +-
build/gsd-valadoc.m4 | 32 ++++++++++++++++++++
configure.ac | 3 ++
docs/Makefile.am | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 128 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index d11a92f..4188141 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,10 @@ build/m4/
*.[ch]
# a few generated files
-gsecuredelete.pc
-gsecuredelete/gsecuredelete.vapi
-gsecuredelete/test
+/gsecuredelete.pc
+/gsecuredelete/gsecuredelete.vapi
+/gsecuredelete/test
+
+/docs/html
+/docs/devhelp
+/docs/gtkdoc
diff --git a/Makefile.am b/Makefile.am
index b16d3f5..9501151 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gsecuredelete
+SUBDIRS = gsecuredelete docs
ACLOCAL_AMFLAGS = -I build/m4 -I build
diff --git a/build/gsd-valadoc.m4 b/build/gsd-valadoc.m4
new file mode 100644
index 0000000..65303f5
--- /dev/null
+++ b/build/gsd-valadoc.m4
@@ -0,0 +1,32 @@
+# Checks for valadoc in `PATH' and define the VALADOC variable if found.
+# Optionally a minimum version number can be requested.
+#
+# GSD_VALADOC_CHECK([MINIMUM-VERSION])
+# ------------------------------------
+AC_DEFUN([GSD_VALADOC_CHECK],
+[
+ AC_ARG_ENABLE([valadoc],
+ [AS_HELP_STRING([--enable-valadoc],
+ [Whether to build the documentation @<:@default=auto@:>@])],
+ [enable_valadoc="$enableval"],
+ [enable_valadoc=auto])
+
+ have_valadoc=no
+ AS_IF([test "x$enable_valadoc" != xno],
+ [AC_PATH_PROG([VALADOC], [valadoc], [NONE])
+ AS_IF([test "x$VALADOC" != xNONE],
+ [AC_MSG_CHECKING([whether $VALADOC is at least version $1])
+ gsd__valadoc_version=`$VALADOC --version | sed 's/Valadoc *//'`
+ AS_VERSION_COMPARE([$1], ["$gsd__valadoc_version"],
+ [have_valadoc=yes],
+ [have_valadoc=yes],
+ [have_valadoc=no])
+ AS_IF([test "x$have_valadoc" != xyes],
+ [AC_MSG_RESULT([no])],
+ [AC_MSG_RESULT([yes])
+ AC_SUBST([VALADOC])])])
+ AS_IF([test "x$have_valadoc" != xyes],
+ [AS_IF([test "x$enable_valadoc" = xyes],
+ [AC_MSG_ERROR([valadoc not found or too old])])])])
+ AM_CONDITIONAL([ENABLE_VALADOC], [test "x$have_valadoc" = xyes])
+])
diff --git a/configure.ac b/configure.ac
index 6d94ae0..71d2aa1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ LT_PREREQ([2.2.0])
LT_INIT
AM_PROG_VALAC([0.11.1])
+GSD_VALADOC_CHECK([0.2.1])
+
GSD_PATH_PROG([SRM], [srm], [/usr/bin/srm])
GSD_PATH_PROG([SFILL], [sfill], [/usr/bin/sfill])
@@ -56,5 +58,6 @@ PKG_CHECK_MODULES([GOBJECT], [gobject-2.0])
AC_CONFIG_FILES([Makefile
gsecuredelete/Makefile
+ docs/Makefile
gsecuredelete.pc])
AC_OUTPUT
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..babdce3
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,85 @@
+
+if ENABLE_VALADOC
+
+
+DOC_NAME = GSecureDelete
+
+valadoc_sources = $(top_srcdir)/gsecuredelete/async-operation.vala \
+ $(top_srcdir)/gsecuredelete/delete-operation.vala \
+ $(top_srcdir)/gsecuredelete/fill-operation.vala \
+ $(top_srcdir)/gsecuredelete/mem-operation.vala \
+ $(top_srcdir)/gsecuredelete/securedelete-operation.vala \
+ $(top_srcdir)/gsecuredelete/swap-operation.vala \
+ $(top_srcdir)/gsecuredelete/utils.vala \
+ $(top_srcdir)/gsecuredelete/zeroable-operation.vala
+
+VALADOC_FLAGS = --no-protected \
+ --vapidir $(top_srcdir)/gsecuredelete \
+ -b $(top_srcdir)/gsecuredelete \
+ $(VALA_PACKAGES:%=--pkg=%) --pkg=config \
+ --package-name $(DOC_NAME) \
+ --package-version @VERSION@ \
+ $(valadoc_sources)
+
+# Removing the target before building the documentation avoids conflicts
+# between doclet and directory names, since valadoc first tries to find the
+# doclet in the current directory.
+# For the gtkdoc doclet, it also prevents leftover files to be used and
+# produce wrong results, e.g. if a file got renamed.
+
+html: $(valadoc_sources)
+ $(RM) -r $@
+ $(VALADOC) \
+ -o $@ \
+ --doclet html \
+ $(VALADOC_FLAGS)
+
+devhelp: $(valadoc_sources)
+ $(RM) -r $@
+ $(VALADOC) \
+ -o $@ \
+ --doclet devhelp \
+ $(VALADOC_FLAGS)
+
+gtkdoc: $(valadoc_sources)
+ $(RM) -r $@
+ $(VALADOC) \
+ -X -l -X $(top_builddir)/gsecuredelete/.libs/libgsecuredelete.so \
+ -X $(top_builddir)/gsecuredelete/gsecuredelete.h \
+ -o $@ \
+ --doclet gtkdoc \
+ $(VALADOC_FLAGS)
+
+
+clean-local:
+ $(RM) -r html devhelp gtkdoc
+
+uninstall-doc-devhelp:
+ $(RM) -r $(DESTDIR)$(datadir)/devhelp/books/$(DOC_NAME)
+
+install-doc-devhelp: devhelp
+ $(MKDIR_P) $(DESTDIR)$(datadir)/devhelp/books/$(DOC_NAME)/img
+ $(INSTALL_DATA) -t $(DESTDIR)$(datadir)/devhelp/books/$(DOC_NAME) devhelp/$(DOC_NAME)/*.*
+ $(INSTALL_DATA) -t $(DESTDIR)$(datadir)/devhelp/books/$(DOC_NAME)/img devhelp/$(DOC_NAME)/img/*
+
+uninstall-doc-gtkdoc:
+ $(RM) -r $(DESTDIR)$(datadir)/gtk-doc/html/$(DOC_NAME)
+
+install-doc-gtkdoc: gtkdoc
+ $(MKDIR_P) $(DESTDIR)$(datadir)/gtk-doc/html/$(DOC_NAME)
+ $(INSTALL_DATA) -t $(DESTDIR)$(datadir)/gtk-doc/html/$(DOC_NAME) gtkdoc/html/*.*
+
+uninstall-hook: uninstall-doc-devhelp uninstall-doc-gtkdoc
+
+install-data-hook: install-doc-devhelp install-doc-gtkdoc
+
+
+all: html devhelp gtkdoc
+
+.PHONY: uninstall-doc-devhelp \
+ install-doc-devhelp \
+ uninstall-doc-gtkdoc \
+ install-doc-gtkdoc
+
+
+endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git
More information about the Pkg-privacy-commits
mailing list