[librsvgmm] Refactor documentation build rules
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Subject: [librsvgmm] Refactor documentation build rules
- Date: Wed, 24 Jun 2009 10:48:16 +0000 (UTC)
commit 820cafb19fc9a4845b5ea2ba86636da792ab1de7
Author: Daniel Elstner <daniel kitta gmail com>
Date: Wed Jun 24 12:27:36 2009 +0200
Refactor documentation build rules
* docs/Makefile.am: Use the $(wildcard ) function of GNU make to
generate the list of files to ship as part of the HTML reference
documentation. Automake does not need a static file list for the
distribution and installation of data files.
({un,}install-reference): Remove custom install rules.
(reference/librsvgmm_doxygen_tags): Use file as a stamp target
and prerequisite of all rules that depend on the Doxygen output.
(docs/reference/Doxyfile): Regenerate when Doxyfile.in changed.
docs/Makefile.am | 74 ++++++++++++++++++++++--------------------------------
1 files changed, 30 insertions(+), 44 deletions(-)
---
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 2777ecc..abb18d6 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -18,60 +18,46 @@
beautify_docs = $(PERL_PATH) $(GMMPROC_DIR)/beautify_docs.pl
devhelp_stylesheet = $(GMMPROC_DIR)/doxygen_to_devhelp.xsl
-devhelp_file = reference/librsvgmm-2.0.devhelp
+htmlref_patterns = \
+ reference/html/*.html \
+ reference/html/*.css \
+ reference/html/*.png \
+ reference/html/*.gif
+
+htmlref_files := $(or\
+ $(wildcard $(htmlref_patterns)),\
+ $(wildcard $(addprefix $(srcdir)/,$(htmlref_patterns))))
referencedir = $(docdir)/reference
-htmlrefdir = $(referencedir)/html
+dist_reference_DATA = reference/librsvgmm_doxygen_tags reference/librsvgmm-2.0.devhelp
+
+htmlrefdir = $(referencedir)/html
+dist_htmlref_DATA = $(htmlref_files)
+
+DISTCLEANFILES = reference/doxygen.log
+MAINTAINERCLEANFILES = $(dist_reference_DATA)
+
+if MAINTAINER_MODE
+reference_deps := reference/Doxyfile $(wildcard $(top_srcdir)/librsvg/librsvgmm/*.h)
+endif
-dist_reference_DATA = reference/librsvgmm_doxygen_tags $(devhelp_file)
-EXTRA_DIST = reference/html
+reference/Doxyfile: $(srcdir)/reference/Doxyfile.in $(top_builddir)/config.status
+ cd "$(top_builddir)" && $(SHELL) ./config.status docs/reference/Doxyfile
-reference/html/index.html: $(srcdir)/reference/Doxyfile.in $(top_srcdir)/librsvg/librsvgmm/*.h
+reference/librsvgmm_doxygen_tags: $(reference_deps)
-rm -rf reference/html reference/xml
+ -rm -f reference/librsvgmm_doxygen_tags
doxygen reference/Doxyfile
$(beautify_docs) reference/html
- @touch "$@"
-reference/librsvgmm_doxygen_tags: reference/html/index.html
+$(htmlref_files): reference/librsvgmm_doxygen_tags
-# Build a devhelp book from the doxygen xml
-$(devhelp_file): reference/html/index.html
+reference/librsvgmm-2.0.devhelp: reference/librsvgmm_doxygen_tags
xsltproc --stringparam book_title 'librsvgmm-2.0 Reference Manual' \
--stringparam book_name 'librsvgmm-2.0' \
--stringparam reference_prefix 'reference/html' \
- -o "$@" $(devhelp_stylesheet) reference/xml/index.xml
-
-post-html: reference/html/index.html
- rsync $(rsync_args) -r reference/html $$USER $(web_host):$(web_path_reference)/html/
-
-doc-clean:
- -rm -rf reference/html reference/xml
- -rm -f reference/librsvgmm-2.0.devhelp reference/doxygen.log
-
-install-reference: reference/html/index.html
- @$(NORMAL_INSTALL)
- $(mkdir_p) "$(DESTDIR)$(htmlrefdir)"
- @dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.png ; do \
- f=`echo "$$p" | sed -e 's|^.*/||'`; \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmlrefdir)/$$f"; \
- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(htmlrefdir)/$$f"; \
- done
-
-uninstall-reference: reference/html/index.html
- @$(NORMAL_UNINSTALL)
- @dir='$(<D)'; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.png ; do \
- f=`echo "$$p" | sed -e 's|^.*/||'`; \
- echo " rm -f $(DESTDIR)$(htmlrefdir)/$$f"; \
- rm -f "$(DESTDIR)$(htmlrefdir)/$$f"; \
- done
- -rmdir -f "$(DESTDIR)$(htmlrefdir)"
-
-all-local: $(devhelp_file)
-
-install-data-local: install-reference
-
-uninstall-local: uninstall-reference
-
-maintainer-clean-local: doc-clean
+ -o "$@" "$(devhelp_stylesheet)" reference/xml/index.xml
-.PHONY: post-html doc-clean install-reference uninstall-reference
+maintainer-clean-local:
+ -rm -rf reference/html reference/xml \
+ "$(srcdir)/reference/html" "$(srcdir)/reference/xml"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]