[mm-common] Make the documentation output directory variable
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mm-common] Make the documentation output directory variable
- Date: Sat, 5 Dec 2009 01:31:21 +0000 (UTC)
commit d3aee69b87f1e5f712399e1a5d739f31bd197f09
Author: Daniel Elstner <daniel kitta gmail com>
Date: Fri Dec 4 23:11:48 2009 +0200
Make the documentation output directory variable
* build/doc-reference.am (doc_outdir): New overridable configuration
variable for the documentation output directory, set to "reference"
by default.
(doc_config): New overridable configuration variable for the Doxygen
configuration file, set to "$(doc_outdir)/Doxyfile" by default.
Throughout the file, make use of the new configuration variables to
replace hard-coded path references.
build/doc-reference.am | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/build/doc-reference.am b/build/doc-reference.am
index 55dd217..21f3246 100644
--- a/build/doc-reference.am
+++ b/build/doc-reference.am
@@ -17,10 +17,18 @@
## Parameters: book_name
## Overrides: pubdocbase, htmlrefpub, book_title, htmlref_patterns,
-## doc_postprocess, doc_install, tagfile_to_devhelp2
+## doc_outdir, doc_config, doc_postprocess, doc_install,
+## tagfile_to_devhelp2
## Files: doc_input
## Output: dist_noinst_DATA, DISTCLEANFILES, MAINTAINERCLEANFILES
+# The name of the sub-directory where the generated documentation
+# will be placed.
+doc_outdir ?= reference
+
+# The name of the Doxygen configuration file.
+doc_config ?= $(doc_outdir)/Doxyfile
+
# The base URL where the online documentation for C++ binding modules
# is located, including the trailing slash.
pubdocbase ?= http://library.gnome.org/devel/
@@ -34,7 +42,7 @@ book_title ?= $(PACKAGE_NAME) Reference Manual
# A list of wildcard patterns matching the files from the HTML directory
# generated by Doxygen which should be distributed and installed.
-htmlref_patterns ?= $(addprefix reference/html/*.,css gif html png)
+htmlref_patterns ?= $(addprefix $(doc_outdir)/html/*.,css gif html png)
# Locations of utilities shipped with glibmm. Made overridable
# in case the installed utilities cannot be used for some reason.
@@ -43,8 +51,8 @@ doc_install ?= $(PERL) -- "$(MMDOCTOOLDIR)/doc-install.pl"
tagfile_to_devhelp2 ?= "$(MMDOCTOOLDIR)/tagfile-to-devhelp2.xsl"
# Names of the main output files.
-doxytagfile = reference/$(book_name).tag
-devhelpfile = reference/$(book_name).devhelp2
+doxytagfile = $(doc_outdir)/$(book_name).tag
+devhelpfile = $(doc_outdir)/$(book_name).devhelp2
# Function: $(call vpath_listall,PATTERN ...)
# Get all filenames which match a PATTERN from the list. Look for files
@@ -62,8 +70,8 @@ devhelpdir = $(datadir)/devhelp/books/$(book_name)
dist_reference_DATA = $(doxytagfile)
dist_noinst_DATA = $(devhelpfile) $(call vpath_listall,$(htmlref_patterns))
-DISTCLEANFILES = reference/doxygen.log
-MAINTAINERCLEANFILES = $(doxytagfile) $(devhelpfile) reference/html/*
+DISTCLEANFILES = $(doc_outdir)/doxygen.log
+MAINTAINERCLEANFILES = $(doxytagfile) $(devhelpfile) $(doc_outdir)/html/*
# The generic bit of the doc-install.pl command line.
doc_install_cmd = $(doc_install) --verbose --mode=0644
@@ -98,7 +106,7 @@ dh_xsl_params = --stringparam book_title '$(book_title)' \
# Generated configuration files which, when updated, should cause the
# reference documentation to be rebuilt.
-doc_config_deps = $(CONFIG_HEADER) $(srcdir)/reference/Doxyfile.in $(srcdir)/Makefile.in
+doc_config_deps = $(CONFIG_HEADER) $(srcdir)/$(doc_config).in $(srcdir)/Makefile.in
# Regenerate the documentation automatically only in maintainer mode.
# Depend on the generated configuration header files to trigger a rebuild
@@ -123,7 +131,7 @@ uninstall-local: uninstall-htmlref uninstall-devhelp
# option, which tells it to perform filename globbing itself, like 'find'.
# This helps to avoid excessively long command lines, as some platforms
# have rather restrictive limits.
-install-htmlref: reference/html/index.html
+install-htmlref: $(doc_outdir)/html/index.html
@$(NORMAL_INSTALL)
$(MKDIR_P) '$(DESTDIR)$(htmlrefdir)'
$(htmlref_install) -t '$(DESTDIR)$(htmlrefdir)' --glob -- $(htmlref_patterns_vpath)
@@ -150,21 +158,20 @@ uninstall-devhelp:
-test ! -r '$(DESTDIR)$(devhelpdir)' || rmdir '$(DESTDIR)$(devhelpdir)'
# Regenerate the Doxygen configuration file automatically.
-reference/Doxyfile: $(srcdir)/reference/Doxyfile.in $(top_builddir)/config.status
+$(doc_config): $(srcdir)/$(doc_config).in $(top_builddir)/config.status
$(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
# Make sure that the documentation will always have been generated before
-# executing the commands of a rule that depends on files in reference/html/.
-reference/html/%: | $(doxytagfile)
+# executing commands of a rule that depends on files in $(doc_outdir)/html/.
+$(doc_outdir)/html/%: | $(doxytagfile)
# Run Doxygen to build the reference documentation. The generated tag file
# also functions as time stamp target for the documentation as a whole.
-$(doxytagfile): $(doc_dependencies) | reference/Doxyfile
+$(doxytagfile): $(doc_dependencies) | $(doc_config)
-$(AM_V_at)rm -f $@
- -$(AM_V_at)rm -fr reference/html
- $(AM_V_GEN)(echo '@INCLUDE =' reference/Doxyfile && \
- echo 'INPUT =' $(doc_input)) | $(DOXYGEN) -
- $(AM_V_at)$(doc_postprocess) 'reference/html/*.html'
+ -$(AM_V_at)rm -fr $(doc_outdir)/html
+ $(AM_V_GEN)(echo '@INCLUDE =' $(doc_config) && echo 'INPUT =' $(doc_input)) | $(DOXYGEN) -
+ $(AM_V_at)$(doc_postprocess) '$(doc_outdir)/html/*.html'
# Run XSL transformation to generate a Devhelp book from a Doxygen tag file.
%.devhelp2: %.tag
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]