diff options
author | Daniel Elstner <daniel.kitta@gmail.com> | 2009-12-04 23:42:58 +0200 |
---|---|---|
committer | Daniel Elstner <daniel.kitta@gmail.com> | 2009-12-05 01:41:10 +0200 |
commit | 1b4a9fcffda1179b91b5d94339e6620b4cb4a6de (patch) | |
tree | 0aef6ef45e0bbbd7d269023aa0e60439d1e4e2fd | |
parent | d3aee69b87f1e5f712399e1a5d739f31bd197f09 (diff) | |
download | mm-common-1b4a9fcffda1179b91b5d94339e6620b4cb4a6de.tar.gz |
Process documentation targets conditionally
* build/doc-reference.am (dist_reference_DATA), (dist_noinst_DATA):
Assign the list of files to install and distribute conditionally,
depending on whether ENABLE_DOCUMENTATION is true. Thus, it is no
longer required to skip the entire documentation build directory if
the documentation is disabled.
(install-data-local), (uninstall-data): As above, but for the phony
targets to install and uninstall files to the system.
($(doc_config)): Do not add any commands to the rule when building
from the top-level directory. Automake automatically generates rules
and commands to rebuild config.status output files at the top level.
-rw-r--r-- | build/doc-reference.am | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/build/doc-reference.am b/build/doc-reference.am index 21f3246..88ec478 100644 --- a/build/doc-reference.am +++ b/build/doc-reference.am @@ -67,8 +67,18 @@ referencedir = $(libdocdir)/reference htmlrefdir = $(referencedir)/html devhelpdir = $(datadir)/devhelp/books/$(book_name) -dist_reference_DATA = $(doxytagfile) -dist_noinst_DATA = $(devhelpfile) $(call vpath_listall,$(htmlref_patterns)) +if ENABLE_DOCUMENTATION +doc_inst_targets = install-htmlref install-devhelp +doc_inst_files = $(doxytagfile) +doc_dist_files = $(devhelpfile) $(call vpath_listall,$(htmlref_patterns)) +else +doc_inst_targets = +doc_inst_files = +doc_dist_files = +endif + +dist_reference_DATA = $(doc_inst_files) +dist_noinst_DATA = $(doc_dist_files) DISTCLEANFILES = $(doc_outdir)/doxygen.log MAINTAINERCLEANFILES = $(doxytagfile) $(devhelpfile) $(doc_outdir)/html/* @@ -121,10 +131,10 @@ endif # Hook up custom rules for translating references to external documentation # to the actual location at install time. -install-data-local: install-htmlref install-devhelp +install-data-local: $(doc_inst_targets) # Hook up corresponding custom uninstall rules. -uninstall-local: uninstall-htmlref uninstall-devhelp +uninstall-local: $(addprefix un,$(doc_inst_targets)) # Install the HTML reference documentation files with just one invocation # of doc-install.pl to speed up the build process. Make use of the --glob @@ -157,10 +167,13 @@ uninstall-devhelp: rm -f '$(DESTDIR)$(devhelpdir)/$(notdir $(devhelpfile))' -test ! -r '$(DESTDIR)$(devhelpdir)' || rmdir '$(DESTDIR)$(devhelpdir)' -# Regenerate the Doxygen configuration file automatically. +# Regenerate the Doxygen configuration file automatically. In the +# top-level build directory Automake already takes care of this. + ifneq ($(subdir),.) $(doc_config): $(srcdir)/$(doc_config).in $(top_builddir)/config.status $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + endif # Make sure that the documentation will always have been generated before # executing commands of a rule that depends on files in $(doc_outdir)/html/. $(doc_outdir)/html/%: | $(doxytagfile) |