[nautilus-actions] Define --with-db2html and --with-gdt options
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Define --with-db2html and --with-gdt options
- Date: Fri, 3 Sep 2010 21:56:39 +0000 (UTC)
commit 03ef022a35bba461254989c43e82d13f7dc290c6
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Sep 3 23:57:13 2010 +0200
Define --with-db2html and --with-gdt options
Let the HTML manuals be generated either with db2html or with gnome-doc-tool.
ChangeLog | 9 +++++
Makefile.am | 2 +
doc/nact/Makefile.am | 77 ++++++++++++++++++++++++++++++++++++----------
m4/na-enable-manuals.m4 | 57 +++++++++++++++++++++++++++++++---
4 files changed, 123 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 472b784..fa46cbc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-09-03 Pierre Wieser <pwieser trychlos org>
+ Declare --with-db2html and --with-gdt options.
+
+ * Makefile.am:
+ Defaut distribution includes PDF and gnome-doc-tool HTML manuals.
+
+ * doc/nact/Makefile.am:
+ * m4/na-enable-manuals.m4:
+ Define --with-db2html and --with-gdt options.
+
* doc/nact/Makefile.am:
HTML and PDF installations honor --htmldir= and --pdfdir= options.
diff --git a/Makefile.am b/Makefile.am
index 878e473..a6dd514 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,6 +48,8 @@ DISTCHECK_CONFIGURE_FLAGS += \
--disable-scrollkeeper \
--enable-gtk-doc \
--enable-html-manuals \
+ --without-db2html \
+ --with-gdt \
--enable-pdf-manuals \
$(NULL)
diff --git a/doc/nact/Makefile.am b/doc/nact/Makefile.am
index 6f2e5f0..c761a25 100644
--- a/doc/nact/Makefile.am
+++ b/doc/nact/Makefile.am
@@ -31,6 +31,15 @@
#
# do not use the $(NULL) syntax here as this may prevent Damned-Lies
# to correctly generate POT files (cf. mail of Claude Paroz 2008-08-29)
+#
+# This produces the Nautilus-Actions Configuration Tool (NACT) Users's Manual.
+# As a user's manual, it may be translated.
+# Default is to produce DocBook XML documents, suitable for Yelp, the
+# Gnome help system.
+# --enable-html-manuals and --enable-pdf-manuals are configure options
+# which produce HTML and PDF formats. These options are always enabled
+# when making distcheck, so that all output formats for all known locales
+# are always included in the distributed tarball.
include $(top_srcdir)/gnome-doc-utils.make
@@ -111,11 +120,14 @@ DOC_LINGUAS = de es
# - xhtml subdirectory has to be previously created
# - figures subdirectory has to be copied to xhtml/
# - there is (as of 2010-09-03) no icon for notes and tips
-# the produced output is very close of that Yelp gives, with in particular
+# the produced output is very close of what Yelp gives, with in particular
# summaries in each chapter while db2html does not produce them
#
-# db2html, gnome-doc-tool: external links are not honored
-# (converted to simple links which target the same frame window)
+# contrarily, gnome-doc-tool does not produce the legal and abstract
+# in top of the document, while db2html does.
+#
+# both db2html and gnome-doc-tool do not honor external links;
+# they are converted to simple links which target the same frame window
pkgdocdir = $(datarootdir)/doc/@PACKAGE -@VERSION@
@@ -139,29 +151,45 @@ all-html-manuals: html.stamp omf2build.stamp
html.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
@-for i in C $(_DOC_REAL_LINGUAS); do \
rm -fr $$i/$(DOC_MODULE).junk; \
- echo "Generating $$i/$(DOC_MODULE)/$(DOC_MODULE).html ..."; \
if ! test -d $$i; then $(MKDIR_P) $$i; fi; \
(cd $$i; \
if test "x$(abs_srcdir)" != "x$(abs_builddir)"; then cp $(abs_srcdir)/$$i/*.xml .; fi; \
- db2html --nochunks $(DOC_MODULE).xml; \
+ if test "x$(WITH_DB2HTML)" = "xyes"; then \
+ _htmlsubdir=$(DOC_MODULE); \
+ echo "Generating $$i/$$_htmlsubdir/$(DOC_MODULE).html ..."; \
+ db2html --nochunks $(DOC_MODULE).xml; \
+ fi; \
+ if test "x$(WITH_GDT)" = "xyes"; then \
+ _htmlsubdir=xhtml; \
+ echo "Generating $$i/$$_htmlsubdir/$(DOC_MODULE).html ..."; \
+ if ! test -d $$_htmlsubdir; then $(MKDIR_P) $$_htmlsubdir; fi; \
+ gnome-doc-tool html -o $$_htmlsubdir -d0 $(DOC_MODULE).xml; \
+ fi; \
if test "x$(abs_srcdir)" != "x$(abs_builddir)"; then rm -f *.xml; fi; \
); \
- cp -rp $(abs_srcdir)/$$i/figures $$i/$(DOC_MODULE)/; \
- chmod -R u+w $$i/$(DOC_MODULE); \
+ if test -d $(abs_srcdir)/$$i/figures; then cp -rp $(abs_srcdir)/$$i/figures $$_htmlsubdir/; fi; \
+ chmod -R u+w $$i/$$_htmlsubdir; \
done
touch html.stamp
# if --htmldir has not been specified, then we default to PKGDOCDIR/html
# in all case, we append the locale as a subdirectory level
+#
+# note that we do not honor here the --with-html-dir gtk-doc option,
+# but the --htmldir autotools option
+#
+# as html have multiple files, we create a per-document subdirectory
install-html-manuals:
@-for _lc in C $(_DOC_REAL_LINGUAS); do \
- _srcdir=$(top_builddir)/doc/nact/$$_lc/$(DOC_MODULE); \
- if test "$(htmldir)" = "$(pkgdocdir)"; then \
- _destdir=$(DESTDIR)$(pkgdocdir)/html/$$_lc; \
+ if test "$(htmldir)" = "$(docdir)"; then \
+ _destdir=$(DESTDIR)$(pkgdocdir)/html/$$_lc/nact; \
else \
- _destdir=$(DESTDIR)$(htmldir)/$$_lc; \
- fi \
+ _destdir=$(DESTDIR)$(htmldir)/$$_lc/nact; \
+ fi; \
if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
+ if test "x$(WITH_DB2HTML)" = "xyes"; then _htmlsubdir=$(DOC_MODULE); fi; \
+ if test "x$(WITH_GDT)" = "xyes"; then _htmlsubdir=xhtml; fi; \
+ _srcdir=$(top_builddir)/doc/nact/$$_lc/$$_htmlsubdir; \
find $$_srcdir -type f | while read _f; do \
_dname=`dirname $$_f`; \
_subdir=`echo "$$_dname" | sed "s|^$$_srcdir[/]*||"`; \
@@ -173,12 +201,19 @@ install-html-manuals:
done
uninstall-html-manuals:
- rm -fr $(DESTDIR)$(pkgdocdir)/html
+ if test "$(htmldir)" = "$(docdir)"; then \
+ _instdir=$(DESTDIR)$(pkgdocdir)/html; \
+ else \
+ _instdir=$(DESTDIR)$(htmldir); \
+ fi; \
+ rm -fr $$_instdir
dist-html-manuals-hook:
for _lc in C $(_DOC_REAL_LINGUAS); do \
$(MKDIR_P) $(distdir)/html/$$_lc; \
- cp -r $(top_builddir)/doc/nact/$$_lc/$(DOC_MODULE)/* $(distdir)/html/$$_lc/; \
+ if test "x$(WITH_DB2HTML)" = "xyes"; then _htmlsubdir=$(DOC_MODULE); fi; \
+ if test "x$(WITH_GDT)" = "xyes"; then _htmlsubdir=xhtml; fi; \
+ cp -r $(top_builddir)/doc/nact/$$_lc/$$_htmlsubdir/* $(distdir)/html/$$_lc/; \
done
find $(distdir)/html -type d -exec chmod 755 {} \;
find $(distdir)/html -type f -exec chmod 644 {} \;
@@ -207,21 +242,28 @@ pdf.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
# if --pdfdir has not been specified, then we default to PKGDOCDIR/pdf
# in all case, we append the locale as a subdirectory level
+#
+# as pdf are monobloc documents, we do not create a per-document subdir
install-pdf-manuals:
@-for _lc in C $(_DOC_REAL_LINGUAS); do \
_srcdir=$(top_builddir)/doc/nact/$$_lc; \
- if test "$(pdfdir)" = "$(pkgdocdir)"; then \
+ if test "$(pdfdir)" = "$(docdir)"; then \
_destdir=$(DESTDIR)$(pkgdocdir)/pdf/$$_lc; \
else \
_destdir=$(DESTDIR)$(pdfdir)/$$_lc; \
- fi \
+ fi; \
if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
echo $(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \
$(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \
done
uninstall-pdf-manuals:
- rm -fr $(DESTDIR)$(pkgdocdir)/pdf
+ if test "$(pdfdir)" = "$(docdir)"; then \
+ _instdir=$(DESTDIR)$(pkgdocdir)/pdf; \
+ else \
+ _instdir=$(DESTDIR)$(pdfdir); \
+ fi; \
+ rm -fr $$_instdir
dist-pdf-manuals-hook:
for _lc in C $(_DOC_REAL_LINGUAS); do \
@@ -269,6 +311,7 @@ clean-html-manuals:
for lc in C $(_DOC_REAL_LINGUAS); do \
rm -fr $$lc/$(DOC_MODULE); \
rm -fr $$lc/$(DOC_MODULE).junk; \
+ rm -fr $$lc/xhtml; \
done
clean-pdf-manuals:
diff --git a/m4/na-enable-manuals.m4 b/m4/na-enable-manuals.m4
index 4da6292..9894ac3 100644
--- a/m4/na-enable-manuals.m4
+++ b/m4/na-enable-manuals.m4
@@ -28,12 +28,22 @@
# serial 1 creation
-dnl add --enable-html-manual and --enable-pdf-manual configure options
+dnl add:
+dnl --enable-html-manuals output user manual in HTML, all locales
+dnl --enable-pdf-manuals output user manual in PDF, all locales
+dnl --with-db2html use db2html (docbook-utils) to generate HTML
+dnl --with-gdt use gnome-doc-tool (gnome-doc-utils) to generate HTML (default)
+dnl
dnl usage: NA_ENABLE_MANUALS
AC_DEFUN([NA_ENABLE_MANUALS],[
AC_REQUIRE([_AC_ARG_NA_ENABLE_HTML_MANUALS])dnl
+ AC_REQUIRE([_AC_ARG_NA_WITH_DB2HTML])dnl
+ AC_REQUIRE([_AC_ARG_NA_WITH_GDT])dnl
AC_REQUIRE([_AC_ARG_NA_ENABLE_PDF_MANUALS])dnl
+
+ _CHECK_FOR_HTML_MANUALS
+ _CHECK_FOR_PDF_MANUALS
])
AC_DEFUN([_AC_ARG_NA_ENABLE_HTML_MANUALS],[
@@ -41,18 +51,53 @@ AC_DEFUN([_AC_ARG_NA_ENABLE_HTML_MANUALS],[
[html-manuals],
AC_HELP_STRING(
[--enable-html-manuals],
- [use db2html to build HTML manuals @<:@default=no@:>@]),,[enable_html_manuals="no"])
+ [build HTML manuals @<:@no@:>@]),,[enable_html_manuals="no"])
+])
+
+AC_DEFUN([_AC_ARG_NA_WITH_DB2HTML],[
+ AC_ARG_WITH(
+ [db2html],
+ AC_HELP_STRING(
+ [--with-db2html],
+ [use db2html to generate HTML documents @<:@no@:>@]),,[with_db2html="no"])
+])
+
+AC_DEFUN([_AC_ARG_NA_WITH_GDT],[
+ AC_ARG_WITH(
+ [gdt],
+ AC_HELP_STRING(
+ [--with-gdt],
+ [use gnome-doc-tool to generate HTML documents @<:@yes@:>@]),,[with_gdt="yes"])
+])
+AC_DEFUN([_CHECK_FOR_HTML_MANUALS],[
AC_MSG_CHECKING([whether to build HTML manuals])
AC_MSG_RESULT(${enable_html_manuals})
if test "x${enable_html_manuals}" = "xyes"; then
- AC_CHECK_PROG([_db2html_found],[db2html],[yes],[no])
- if test "x${_db2html_found}" = "xno"; then
- AC_MSG_ERROR([db2html not available and --enable-html-manual requested])
+ if test "x${with_db2html}" = "xyes" -a "x${with_gdt}" = "xyes"; then
+ AC_MSG_ERROR([--with-db2html and --with-gdt are mutually incompatible])
+ fi
+ if test "x${with_db2html}" = "xno" -a "x${with_gdt}" = "xno"; then
+ AC_MSG_ERROR([--with-db2html or --with-gdt must be choosen])
+ fi
+ if test "x${with_db2html}" = "xyes"; then
+ AC_CHECK_PROG([_db2html_found],[db2html],[yes],[no])
+ if test "x${_db2html_found}" = "xno"; then
+ AC_MSG_ERROR([db2html not available and --enable-html-manuals --with-db2html requested])
+ fi
+ fi
+ if test "x${with_gdt}" = "xyes"; then
+ AC_CHECK_PROG([_gdt_found],[gnome-doc-tool],[yes],[no])
+ if test "x${_gdt_found}" = "xno"; then
+ AC_MSG_ERROR([gnome-doc-tools not available and --enable-html-manuals requested])
+ fi
fi
fi
+ AC_SUBST([WITH_DB2HTML],[${with_db2html}])
+ AC_SUBST([WITH_GDT],[${with_gdt}])
+
AM_CONDITIONAL([ENABLE_HTML_MANUALS], [test "x${enable_html_manuals}" = "xyes"])
])
@@ -62,7 +107,9 @@ AC_DEFUN([_AC_ARG_NA_ENABLE_PDF_MANUALS],[
AC_HELP_STRING(
[--enable-pdf-manuals],
[use dblatex to build PDF manuals @<:@default=no@:>@]),,[enable_pdf_manuals="no"])
+])
+AC_DEFUN([_CHECK_FOR_PDF_MANUALS],[
AC_MSG_CHECKING([whether to build PDF manuals])
AC_MSG_RESULT(${enable_pdf_manuals})
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]