[glom] Use installed mm-common instead of copying it



commit 19799e441b3afdc2f41058da1e8d82075a4f5e16
Author: Daniel Elstner <danielk openismus com>
Date:   Mon Apr 26 17:29:54 2010 +0200

    Use installed mm-common instead of copying it
    
    * autogen.sh: Run mm-common-prepare to pull in the mm-common include
    files for Automake.
    * docs/libglom_reference/Makefile.am: Set up configuration variables
    and include doc-reference.am instead of copy'n'pasting its content.
    * docs/libglom-reference/doxygen_to_devhelp.xsl: Delete file.  It is
    shipped with mm-common and also part of the glibmm installation.

 .gitignore                                    |    4 +
 ChangeLog                                     |   11 ++
 autogen.sh                                    |    1 +
 docs/libglom_reference/Makefile.am            |  198 +------------------------
 docs/libglom_reference/doxygen_to_devhelp.xsl |   94 ------------
 5 files changed, 23 insertions(+), 285 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 55ff8e8..1c7453c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,10 @@ Makefile.in
 /intltool-extract.in
 /intltool-merge.in
 /intltool-update.in
+/compile-binding.am
+/dist-changelog.am
+/doc-reference.am
+/generate-binding.am
 /gnome-doc-utils.make
 /omf.make
 /xmldocs.make
diff --git a/ChangeLog b/ChangeLog
index 629bc0b..fd2898a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-04-26  Daniel Elstner  <danielk openismus com>
+
+	Use installed mm-common instead of copying it
+
+	* autogen.sh: Run mm-common-prepare to pull in the mm-common include
+	files for Automake.
+	* docs/libglom_reference/Makefile.am: Set up configuration variables
+	and include doc-reference.am instead of copy'n'pasting its content.
+	* docs/libglom-reference/doxygen_to_devhelp.xsl: Delete file.  It is
+	shipped with mm-common and also part of the glibmm installation.
+
 2010-04-26  Murray Cumming  <murrayc murrayc com>
 
 	Self-Hosting test: Check that cleanup works.
diff --git a/autogen.sh b/autogen.sh
index 88bf72f..9bf92f3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,6 +5,7 @@ test -n "$srcdir" || srcdir=.
   cd "$srcdir" &&
   gnome-doc-common --copy &&
   gnome-doc-prepare --automake --copy --force &&
+  mm-common-prepare --copy --force &&
   AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install
 ) || exit
 test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
diff --git a/docs/libglom_reference/Makefile.am b/docs/libglom_reference/Makefile.am
index c05e382..39c3132 100644
--- a/docs/libglom_reference/Makefile.am
+++ b/docs/libglom_reference/Makefile.am
@@ -1,206 +1,22 @@
-## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+## Copyright (c) 2010  Openismus GmbH  <http://www.openismus.com/>
 ##
-## This file is part of mm-common.
+## This file is part of Glom.
 ##
-## mm-common is free software: you can redistribute it and/or modify
+## Glom is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published
 ## by the Free Software Foundation, either version 2 of the License,
 ## or (at your option) any later version.
 ##
-## mm-common is distributed in the hope that it will be useful,
+## Glom is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.
-
-## Parameters:  book_name
-## Overrides:   pubdocbase, htmlrefpub, book_title, htmlref_patterns,
-##              doc_outdir, doc_config, doc_postprocess, doc_install,
-##              tagfile_to_devhelp2, doxytagfile, devhelpfile
-## Files:       doc_input
-## Output:      dist_noinst_DATA, DISTCLEANFILES, MAINTAINERCLEANFILES
+## along with Glom.  If not, see <http://www.gnu.org/licenses/>.
 
 book_name = libglom-$(GLOM_ABI_VERSION)
 doc_input = $(top_srcdir)/glom/libglom
+doc_outdir = .
 
-
-
-# The name of the sub-directory where the generated documentation
-# will be placed.
-doc_outdir ?= .
-
-# 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/
-
-# The URL of the module's online HTML reference documentation, which
-# may or may not end in a trailing slash.
-htmlrefpub ?= $(pubdocbase)$(PACKAGE_TARNAME)/unstable/
-
-# The title of the generated Devhelp book.
-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 $(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.
-doc_postprocess     ?= $(PERL) -- "$(MMDOCTOOLDIR)/doc-postprocess.pl"
-doc_install         ?= $(PERL) -- "$(MMDOCTOOLDIR)/doc-install.pl"
-tagfile_to_devhelp2 ?= "$(MMDOCTOOLDIR)/tagfile-to-devhelp2.xsl"
-
-# Names of the main output files.
-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
-# relative to either the current directory or $(srcdir).  Strip $(srcdir)/
-# again before returning and remove any duplicates.
-vpath_srclist = $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/,$(1))))
-vpath_listall = $(sort $(wildcard $(1)) $(if $(srcdir:.=),$(vpath_srclist)))
-
-# Installation directories.
-libdocdir    = $(datarootdir)/doc/$(book_name)
-referencedir = $(libdocdir)/reference
-htmlrefdir   = $(referencedir)/html
-devhelpdir   = $(datadir)/devhelp/books/$(book_name)
-
-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 = $(strip $(doc_inst_files))
-dist_noinst_DATA    = $(strip $(doc_dist_files))
-
-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
-
-# Transform $(datarootdir) into a URI to match MM_ARG_WITH_TAGFILE_DOC().
-datarootdir_esc = $(subst $(subst ,, ),%20,$(subst \,/,$(datarootdir)))
-docdir_base_uri = file:///$(patsubst /%,%,$(datarootdir_esc:/=))/doc
-
-# The command and options used to install the files from the HTML reference
-# documentation.  The $(subst) magic translates external tag references from
-# absolute to relative paths if the destination is on the local file system
-# and installed under the same prefix as the package being built.
-htmlref_relinst = $(subst @$(docdir_base_uri)/,@../../../,$(DOCINSTALL_FLAGS))
-htmlref_install = $(doc_install_cmd) $(htmlref_relinst)
-
-# The command and options used to install the Devhelp file.
-devhelp_install = $(doc_install_cmd) --book-base='$(htmlrefdir:/=)'
-
-# Helper variables to replicate each pattern with a $(srcdir)/ prefix.
-# Also add quoting to prevent the shell from expanding the patterns.
-htmlref_patterns_dup   = $(foreach item,$(htmlref_patterns),'$(item)' '$(srcdir)/$(item)')
-htmlref_patterns_quote = $(patsubst %,'%',$(htmlref_patterns))
-htmlref_patterns_vpath = $(if $(srcdir:.=),$(htmlref_patterns_dup),$(htmlref_patterns_quote))
-
-# Expand to a list of -name 'PATTERN' arguments for use with 'find'.
-htmlref_find_patterns = $(patsubst %,-name '%' -o,$(notdir $(htmlref_patterns))) -false
-
-# The parameters to the Doxygen-to-Devhelp XSLT script
-dh_xsl_params =	--stringparam book_title '$(book_title)' \
-		--stringparam book_name '$(book_name)' \
-		--stringparam book_base html
-
-# Generated configuration files which, when updated, should cause the
-# reference documentation to be rebuilt.
-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
-# if a configuration value changed.  The configuration header files only
-# have their timestamp modified when the content actually changed, which
-# is not the case for any other files generated by configure.
-if MAINTAINER_MODE
-doc_dependencies = $(doc_config_deps) $(doc_input)
-else
-doc_dependencies =
-endif
-
-# Explicitly depend on the files to be distributed or installed.
-all-local: $(doc_inst_files) $(doc_dist_files)
-
-# Hook up custom rules for translating references to external documentation
-# to the actual location at install time.
-install-data-local: $(doc_inst_targets)
-
-# Hook up corresponding custom uninstall rules.
-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
-# 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: $(doc_outdir)/html/index.html
-	@$(NORMAL_INSTALL)
-	$(MKDIR_P) '$(DESTDIR)$(htmlrefdir)'
-	$(htmlref_install) -t '$(DESTDIR)$(htmlrefdir)' --glob -- $(htmlref_patterns_vpath)
-
-# Delete files from the html installation directory.  Avoid recursive
-# directory removal, and apply the same wildcard pattern as was used to
-# select files for installation.
-uninstall-htmlref:
-	@$(NORMAL_UNINSTALL)
-	(cd '$(DESTDIR)$(htmlrefdir)' 2>/dev/null || exit 0; \
-	 find . -type f '(' $(htmlref_find_patterns) ')' -exec rm -f '{}' '+')
-	-test ! -r '$(DESTDIR)$(htmlrefdir)' || rmdir '$(DESTDIR)$(htmlrefdir)'
-
-# Install the Devhelp file, translating the base path on the fly.
-install-devhelp: $(devhelpfile)
-	@$(NORMAL_INSTALL)
-	$(MKDIR_P) '$(DESTDIR)$(devhelpdir)'
-	$(devhelp_install) -t '$(DESTDIR)$(devhelpdir)' -- $^
-
-# Remove the installed Devhelp file and directory.
-uninstall-devhelp:
-	@$(NORMAL_UNINSTALL)
-	rm -f '$(DESTDIR)$(devhelpdir)/$(notdir $(devhelpfile))'
-	-test ! -r '$(DESTDIR)$(devhelpdir)' || rmdir '$(DESTDIR)$(devhelpdir)'
-
-# 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)
-
-# 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) | $(doc_config)
-	-$(AM_V_at)rm -f $@
-	-$(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
-	$(AM_V_GEN)$(XSLTPROC) $(dh_xsl_params) -o $@ $(tagfile_to_devhelp2) $<
-
-.PHONY: install-htmlref uninstall-htmlref install-devhelp uninstall-devhelp
-
-# Instruct GNU make to delete the targets of a rule after it failed, in
-# order to avoid the complication of handling that situation manually.
-.DELETE_ON_ERROR:
+include $(top_srcdir)/doc-reference.am



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]