From 52ff4f42c52166dafa7e619f95f458c9e3873165 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Tue, 28 May 2019 14:48:42 +0200 Subject: Rename directory build/ to am_include/ This is in preparation for building mm-common with meson in the near future. When jhbuild is used for building a module with meson, and the user has requested builddir==srcdir, which meson forbids, jhbuild creates a $srcdir/build directory and builds there, even if there already is such a directory, used for other purposes. --- Makefile.am | 12 +-- README | 30 +++--- am_include/compile-binding.am | 60 ++++++++++++ am_include/dist-changelog.am | 34 +++++++ am_include/doc-reference.am | 208 +++++++++++++++++++++++++++++++++++++++++ am_include/generate-binding.am | 90 ++++++++++++++++++ build/compile-binding.am | 60 ------------ build/dist-changelog.am | 34 ------- build/doc-reference.am | 208 ----------------------------------------- build/generate-binding.am | 90 ------------------ 10 files changed, 413 insertions(+), 413 deletions(-) create mode 100644 am_include/compile-binding.am create mode 100644 am_include/dist-changelog.am create mode 100644 am_include/doc-reference.am create mode 100644 am_include/generate-binding.am delete mode 100644 build/compile-binding.am delete mode 100644 build/dist-changelog.am delete mode 100644 build/doc-reference.am delete mode 100644 build/generate-binding.am diff --git a/Makefile.am b/Makefile.am index 3fe0f3d..49858c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,10 +25,10 @@ man1_MANS = util/mm-common-prepare.1 # into projects at autogen.sh time: build_supportdir = $(pkgdatadir)/build dist_build_support_DATA = \ - build/compile-binding.am \ - build/dist-changelog.am \ - build/doc-reference.am \ - build/generate-binding.am + am_include/compile-binding.am \ + am_include/dist-changelog.am \ + am_include/doc-reference.am \ + am_include/generate-binding.am # These are installed so that aclocal can copy them into aclocal.m4 # at autogen.sh time: @@ -45,7 +45,7 @@ dist_aclocal_macro_DATA = \ # These are installed so that mm-common-prepare can copy them into projects # at autogen.sh time if a directory path is given to MM_CONFIG_DOCTOOL_DIR(), -# or they can be found via pkg-config --variable=doctooldir mm-common, +# or they can be found via pkg-config --variable=doctooldir mm-common-util, # which is preferrable. doctooldir = $(pkgdatadir)/doctool dist_doctool_DATA = \ @@ -165,7 +165,7 @@ util/mm-common-prepare.1: $(srcdir)/util/mm-common-prepare.1.in Makefile skeletonmm.tar.gz: $(skeletonmm_files) $(AM_V_GEN)($(srctar_stdout) $(skeletonmm_files)) | gzip -c -n >$@ -include $(top_srcdir)/build/dist-changelog.am +include $(top_srcdir)/am_include/dist-changelog.am install-data-hook: $(if $(DESTDIR),,postinst-acdir-notice) diff --git a/README b/README index b942398..3208f4f 100644 --- a/README +++ b/README @@ -67,10 +67,10 @@ in the ${datadir}/aclocal directory. Since all used M4 macros are copied into aclocal.m4, these macro files are required only in maintainer-mode. For this reason, they are not copied into the source tree of a project by mm-common-prepare. If mm-common is installed to a different prefix than -Automake, it may be necessary to adjust ACLOCAL_FLAGS accordingly so that +Automake, it may be necessary to adjust ACLOCAL_PATH accordingly so that aclocal can find the M4 files: - export ACLOCAL_FLAGS="-I ${mm_common_prefix}/share/aclocal" + export ACLOCAL_PATH="${mm_common_prefix}/share/aclocal" This step is not necessary when using jhbuild, as it takes care of setting up the environment for using the locally built modules. @@ -123,27 +123,27 @@ macros/mm-ax_cxx_compile_stdcxx.m4: Automake include files ---------------------- -The Automake include files are located in the build/ directory. The -installed mm-common-prepare program copies all of the .am files into +The Automake include files are located in the am_include/ directory. +The installed mm-common-prepare program copies all of the .am files into a project's source tree. If AC_CONFIG_AUX_DIR([...]) is specified in the configure.ac file, the .am files will be placed in the indicated subdirectory. -build/generate-binding.am: - Variables and rules for running the gmmproc code generate to produce +am_include/generate-binding.am: + Variables and rules for running the gmmproc code generator to produce the source code files for a C++ binding module. -build/compile-binding.am: +am_include/compile-binding.am: Variables and rules for compiling and linking the shared library which implements a C++ binding module. -build/doc-reference.am: +am_include/doc-reference.am: Variables and rules for building the API reference documentation using Doxygen, and to create a Devhelp book for the library. The installation rules also take care of translating references to external documentation in the generated hypertext documents. -build/dist-changelog.am: +am_include/dist-changelog.am: A dist-hook rule to automatically generate a ChangeLog file when making a release, intended to be used by modules which use the version control log exclusively to document changes. @@ -155,12 +155,12 @@ These are two Perl scripts, a style sheet, and one XSL transformation which assist with the task of generating and installing the Doxygen reference documentation. At least doc-install.pl is also required for tarball builds. -To avoid copying these files into all binding modules, they are also -distributed and installed with the glibmm module. Those binding modules -which cannot depend on glibmm must call MM_CONFIG_DOCTOOL_DIR([...]) in -configure.ac to indicate to mm-common-prepare that it should copy the -documentation utilities into the project's source tree. Otherwise the -files installed with glibmm will be used automatically. +To avoid copying these files into all binding modules, they are +distributed and installed with the mm-common module. Those binding modules +which shall depend on mm-common only in maintainer-mode must call +MM_CONFIG_DOCTOOL_DIR([...]) in configure.ac to indicate to mm-common-prepare +that it should copy the documentation utilities into the project's source tree. +Otherwise the files installed with mm-common will be used automatically. util/doc-postprocess.pl: A simple script to post-process the HTML files generated by Doxygen. diff --git a/am_include/compile-binding.am b/am_include/compile-binding.am new file mode 100644 index 0000000..c8a1e35 --- /dev/null +++ b/am_include/compile-binding.am @@ -0,0 +1,60 @@ +## Copyright (c) 2009 Openismus GmbH +## +## This file is part of mm-common. +## +## mm-common 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, +## 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 . + +## Parameters: lib_LTLIBRARIES +## Overrides: binding_name, binding_basedir, binding_modulename +## Files: files_built_cc, files_built_h, files_built_ph, +## files_extra_cc, files_extra_h, files_extra_ph +## Output: binding_sources, binding_includes, binding_cppflags + +# The name of the binding module. Usually identical to the name of the +# directory where the generated sources and include files live. +binding_name ?= $(notdir $(subdir)) + +# The parent directory of the src/ and libmm/ directories. +# Usually the same as the C library name. +binding_basedir ?= $(patsubst %/,%,$(dir $(subdir))) + +# The library name of the binding, possibly including an API version suffix. +# Depending on the module, the "lib" prefix may or may not be included. +binding_modulename ?= $(patsubst lib%,$(binding_libprefix)%,$(basename $(lib_LTLIBRARIES))) + +# Try to work out whether the binding's module name includes a "lib" prefix. +binding_libprefix = $(if $(filter lib%,$(binding_name)),lib) + +# Files to be listed in the module's _SOURCES variable. +binding_sources = $(files_built_cc) $(files_extra_cc) + +# Default include directories and preprocessor flags. +binding_includes = -I..$(if $(srcdir:.=), -I$(top_srcdir)/$(binding_basedir)) -I$(top_builddir) +binding_cppflags = -DG_LOG_DOMAIN=\"$(binding_name)\" + +# Installation directories for header files. +binding_includedir = $(includedir)/$(binding_modulename)/$(binding_name) +binding_privatedir = $(binding_includedir)/private + +# List of installed header files. +binding_include_HEADERS = $(files_built_h) $(files_extra_h) +binding_private_HEADERS = $(files_built_ph) $(files_extra_ph) + +# Delete built sources on make maintainer-clean. +binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph) +MAINTAINERCLEANFILES = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources)) + +# 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: diff --git a/am_include/dist-changelog.am b/am_include/dist-changelog.am new file mode 100644 index 0000000..a3a2748 --- /dev/null +++ b/am_include/dist-changelog.am @@ -0,0 +1,34 @@ +## Copyright (c) 2009 Daniel Elstner +## +## This file is part of mm-common. +## +## mm-common 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, +## 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 . + +if MAINTAINER_MODE +dist-hook: dist-changelog +else +dist-hook: +endif + +.PHONY: dist-changelog + +dist-changelog: + $(AM_V_at)if git --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) \ + log --no-merges --date=short --pretty='tformat:%cd %an <%ae>%n%n%s%n%n%b' | \ + $(SED) -e '/^[12]...-[01].-[0123]. [^<>]* <[^<>]*>$$/,/^$$/ b' \ + -e '/[^ ]/,/^[ ]*$$/ !d' \ + -e 's/^[ ]*/ /' \ + -e 's/^[ ]*$$//' >.ChangeLog.tmp; \ + then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ + else rm -f .ChangeLog.tmp; exit 1; fi diff --git a/am_include/doc-reference.am b/am_include/doc-reference.am new file mode 100644 index 0000000..da5642a --- /dev/null +++ b/am_include/doc-reference.am @@ -0,0 +1,208 @@ +## Copyright (c) 2009, 2011 Openismus GmbH +## +## This file is part of mm-common. +## +## mm-common 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, +## 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 . + +## Parameters: book_name +## Overrides: doc_outdir, doc_config, book_title, htmlref_patterns, +## doc_postprocess, doc_install, tagfile_to_devhelp2, +## doxytagfile, devhelpfile +## 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 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 js 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) + +# Optionally, the documentation utilities may be included in source tarballs +# so that mm-common is only required when building in maintainer mode. +if DIST_DOCTOOLS +doctools_dist_files = $(addprefix $(MMDOCTOOLDIR)/,doc-postprocess.pl doc-install.pl tagfile-to-devhelp2.xsl doxygen-extra.css) +else +doctools_dist_files = +endif + +if ENABLE_DOCUMENTATION +doc_build_files = $(doxytagfile) $(devhelpfile) +doc_inst_targets = install-htmlref install-devhelp +doc_inst_files = $(doxytagfile) +doc_dist_files = $(devhelpfile) $(call vpath_listall,$(htmlref_patterns)) +else +doc_build_files = +doc_inst_targets = +doc_inst_files = +doc_dist_files = +endif + +dist_reference_DATA = $(strip $(doc_inst_files)) +dist_noinst_DATA = $(strip $(doctools_dist_files) $(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 + +# Export this variable for use in the Doxygen configuration file. +export MMDOCTOOLDIR + +# Depend on files that we know shall be built. +# $(call vpath_listall,$(htmlref_patterns)) is not used as a prerequisite. +# It would expand to files that exist when the make command is issued, +# which is not necessarily the set of files that shall be built. +all-local: $(doc_build_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: diff --git a/am_include/generate-binding.am b/am_include/generate-binding.am new file mode 100644 index 0000000..fe9886d --- /dev/null +++ b/am_include/generate-binding.am @@ -0,0 +1,90 @@ +## Copyright (c) 2009 Openismus GmbH +## +## This file is part of mm-common. +## +## mm-common 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, +## 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 . + +## Parameters: binding_name, wrap_init_flags +## Overrides: codegen_srcdir, codegen_m4_srcdir, binding_outputdir, +## gmmproc, gen_wrap_init, gmmproc_flags +## Files: files_codegen_m4, files_defs, files_hg, files_ccg +## Output: dist_noinst_DATA, gmmproc_dependencies, other_built_sources, +## MAINTAINERCLEANFILES + +# Location of the module's gmmproc support files. +codegen_srcdir ?= $(top_srcdir)/codegen + +# Location of the module's gmmproc M4 files, +# and of any extra m4 files from installed modules, +# such as from gtkmm rather than just glibmm. +# Use, for instance, this in configure.ac: +# MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir gtkmm-3.0]) +codegen_m4_srcdir ?= $(codegen_srcdir)/m4 + +# Destination directory of the generated source files. +binding_outputdir ?= $(if $(srcdir:.=),$(dir $(top_srcdir)/$(subdir)),../)$(binding_name) + +# Additional built sources not generated by gmmproc. +other_built_sources = $(binding_outputdir)/wrap_init.cc + +# Where to put the stamp files for the gmmproc output. +binding_stampdir = $(srcdir)/.stamps + +# Lists of qualified file names relative to the current directory. +binding_relfiles_m4 = $(addprefix $(codegen_m4_srcdir)/,$(files_codegen_m4)) +binding_relfiles_hg = $(addprefix $(srcdir)/,$(files_hg)) +binding_stampfiles = $(patsubst %.hg,$(binding_stampdir)/%.stamp,$(files_hg)) + +# Distributed code generation source files. +dist_noinst_DATA = $(files_defs) $(files_hg) $(files_ccg) + +# Delete stamps on make maintainer-clean. The other generated source +# files are deleted by the make rules for the output directory. +MAINTAINERCLEANFILES = $(binding_stampdir)/*.stamp + +# Dependencies of the gmmproc code generator targets. +gmmproc_dependencies = $(binding_relfiles_m4) $(files_defs) + +# Default command lines for running the code generators. +gmmproc ?= $(PERL) -I"$(GMMPROC_DIR)/pm" -- "$(GMMPROC_DIR)/gmmproc" +gen_wrap_init ?= $(PERL) -- "$(GMMPROC_DIR)/generate_wrap_init.pl" +codegen_m4_flags = $(addprefix -I , $(codegen_m4_srcdir) $(GMMPROC_EXTRA_M4_DIR)) +gmmproc_flags ?= $(codegen_m4_flags) --defs $(srcdir) + +# Automatically created output directories. +binding_mkdirs = $(binding_stampdir) $(binding_outputdir)/private + +# Show names of generated files in silent rules output. +mm_0_gen = @echo ' GEN $(binding_outputdir)/{$*.cc,$*.h,private/$*_p.h}'; +mm_v_gen = $(if $(filter 0,$(or $(V),$(AM_DEFAULT_VERBOSITY))),$(mm_0_gen)) + +# Declare the built sources main targets. +all-local: $(binding_stampfiles) $(other_built_sources) + +# Create the output directories if they do not exist already. +$(binding_mkdirs): + $(AM_V_at)$(MKDIR_P) $@ + +# Generate the wrap_init.cc file using generate_wrap_init.pl. +$(binding_outputdir)/wrap_init.cc: $(binding_relfiles_hg) $(srcdir)/Makefile.in + $(AM_V_GEN)$(gen_wrap_init) $(wrap_init_flags) $(binding_relfiles_hg) >$@ + +# Run the gmmproc code generator to produce the C++ binding code. +$(binding_stampdir)/%.stamp: %.hg %.ccg $(gmmproc_dependencies) | $(binding_mkdirs) + @: >$@ + $(mm_v_gen)$(gmmproc) $(gmmproc_flags) $* $(srcdir) $(binding_outputdir) + +# 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: diff --git a/build/compile-binding.am b/build/compile-binding.am deleted file mode 100644 index c8a1e35..0000000 --- a/build/compile-binding.am +++ /dev/null @@ -1,60 +0,0 @@ -## Copyright (c) 2009 Openismus GmbH -## -## This file is part of mm-common. -## -## mm-common 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, -## 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 . - -## Parameters: lib_LTLIBRARIES -## Overrides: binding_name, binding_basedir, binding_modulename -## Files: files_built_cc, files_built_h, files_built_ph, -## files_extra_cc, files_extra_h, files_extra_ph -## Output: binding_sources, binding_includes, binding_cppflags - -# The name of the binding module. Usually identical to the name of the -# directory where the generated sources and include files live. -binding_name ?= $(notdir $(subdir)) - -# The parent directory of the src/ and libmm/ directories. -# Usually the same as the C library name. -binding_basedir ?= $(patsubst %/,%,$(dir $(subdir))) - -# The library name of the binding, possibly including an API version suffix. -# Depending on the module, the "lib" prefix may or may not be included. -binding_modulename ?= $(patsubst lib%,$(binding_libprefix)%,$(basename $(lib_LTLIBRARIES))) - -# Try to work out whether the binding's module name includes a "lib" prefix. -binding_libprefix = $(if $(filter lib%,$(binding_name)),lib) - -# Files to be listed in the module's _SOURCES variable. -binding_sources = $(files_built_cc) $(files_extra_cc) - -# Default include directories and preprocessor flags. -binding_includes = -I..$(if $(srcdir:.=), -I$(top_srcdir)/$(binding_basedir)) -I$(top_builddir) -binding_cppflags = -DG_LOG_DOMAIN=\"$(binding_name)\" - -# Installation directories for header files. -binding_includedir = $(includedir)/$(binding_modulename)/$(binding_name) -binding_privatedir = $(binding_includedir)/private - -# List of installed header files. -binding_include_HEADERS = $(files_built_h) $(files_extra_h) -binding_private_HEADERS = $(files_built_ph) $(files_extra_ph) - -# Delete built sources on make maintainer-clean. -binding_built_sources = $(files_built_cc) $(files_built_h) $(files_built_ph) -MAINTAINERCLEANFILES = $(binding_built_sources) $(addprefix $(srcdir)/,$(binding_built_sources)) - -# 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: diff --git a/build/dist-changelog.am b/build/dist-changelog.am deleted file mode 100644 index a3a2748..0000000 --- a/build/dist-changelog.am +++ /dev/null @@ -1,34 +0,0 @@ -## Copyright (c) 2009 Daniel Elstner -## -## This file is part of mm-common. -## -## mm-common 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, -## 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 . - -if MAINTAINER_MODE -dist-hook: dist-changelog -else -dist-hook: -endif - -.PHONY: dist-changelog - -dist-changelog: - $(AM_V_at)if git --git-dir=$(top_srcdir)/.git --work-tree=$(top_srcdir) \ - log --no-merges --date=short --pretty='tformat:%cd %an <%ae>%n%n%s%n%n%b' | \ - $(SED) -e '/^[12]...-[01].-[0123]. [^<>]* <[^<>]*>$$/,/^$$/ b' \ - -e '/[^ ]/,/^[ ]*$$/ !d' \ - -e 's/^[ ]*/ /' \ - -e 's/^[ ]*$$//' >.ChangeLog.tmp; \ - then mv -f .ChangeLog.tmp "$(top_distdir)/ChangeLog"; \ - else rm -f .ChangeLog.tmp; exit 1; fi diff --git a/build/doc-reference.am b/build/doc-reference.am deleted file mode 100644 index da5642a..0000000 --- a/build/doc-reference.am +++ /dev/null @@ -1,208 +0,0 @@ -## Copyright (c) 2009, 2011 Openismus GmbH -## -## This file is part of mm-common. -## -## mm-common 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, -## 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 . - -## Parameters: book_name -## Overrides: doc_outdir, doc_config, book_title, htmlref_patterns, -## doc_postprocess, doc_install, tagfile_to_devhelp2, -## doxytagfile, devhelpfile -## 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 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 js 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) - -# Optionally, the documentation utilities may be included in source tarballs -# so that mm-common is only required when building in maintainer mode. -if DIST_DOCTOOLS -doctools_dist_files = $(addprefix $(MMDOCTOOLDIR)/,doc-postprocess.pl doc-install.pl tagfile-to-devhelp2.xsl doxygen-extra.css) -else -doctools_dist_files = -endif - -if ENABLE_DOCUMENTATION -doc_build_files = $(doxytagfile) $(devhelpfile) -doc_inst_targets = install-htmlref install-devhelp -doc_inst_files = $(doxytagfile) -doc_dist_files = $(devhelpfile) $(call vpath_listall,$(htmlref_patterns)) -else -doc_build_files = -doc_inst_targets = -doc_inst_files = -doc_dist_files = -endif - -dist_reference_DATA = $(strip $(doc_inst_files)) -dist_noinst_DATA = $(strip $(doctools_dist_files) $(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 - -# Export this variable for use in the Doxygen configuration file. -export MMDOCTOOLDIR - -# Depend on files that we know shall be built. -# $(call vpath_listall,$(htmlref_patterns)) is not used as a prerequisite. -# It would expand to files that exist when the make command is issued, -# which is not necessarily the set of files that shall be built. -all-local: $(doc_build_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: diff --git a/build/generate-binding.am b/build/generate-binding.am deleted file mode 100644 index fe9886d..0000000 --- a/build/generate-binding.am +++ /dev/null @@ -1,90 +0,0 @@ -## Copyright (c) 2009 Openismus GmbH -## -## This file is part of mm-common. -## -## mm-common 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, -## 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 . - -## Parameters: binding_name, wrap_init_flags -## Overrides: codegen_srcdir, codegen_m4_srcdir, binding_outputdir, -## gmmproc, gen_wrap_init, gmmproc_flags -## Files: files_codegen_m4, files_defs, files_hg, files_ccg -## Output: dist_noinst_DATA, gmmproc_dependencies, other_built_sources, -## MAINTAINERCLEANFILES - -# Location of the module's gmmproc support files. -codegen_srcdir ?= $(top_srcdir)/codegen - -# Location of the module's gmmproc M4 files, -# and of any extra m4 files from installed modules, -# such as from gtkmm rather than just glibmm. -# Use, for instance, this in configure.ac: -# MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir gtkmm-3.0]) -codegen_m4_srcdir ?= $(codegen_srcdir)/m4 - -# Destination directory of the generated source files. -binding_outputdir ?= $(if $(srcdir:.=),$(dir $(top_srcdir)/$(subdir)),../)$(binding_name) - -# Additional built sources not generated by gmmproc. -other_built_sources = $(binding_outputdir)/wrap_init.cc - -# Where to put the stamp files for the gmmproc output. -binding_stampdir = $(srcdir)/.stamps - -# Lists of qualified file names relative to the current directory. -binding_relfiles_m4 = $(addprefix $(codegen_m4_srcdir)/,$(files_codegen_m4)) -binding_relfiles_hg = $(addprefix $(srcdir)/,$(files_hg)) -binding_stampfiles = $(patsubst %.hg,$(binding_stampdir)/%.stamp,$(files_hg)) - -# Distributed code generation source files. -dist_noinst_DATA = $(files_defs) $(files_hg) $(files_ccg) - -# Delete stamps on make maintainer-clean. The other generated source -# files are deleted by the make rules for the output directory. -MAINTAINERCLEANFILES = $(binding_stampdir)/*.stamp - -# Dependencies of the gmmproc code generator targets. -gmmproc_dependencies = $(binding_relfiles_m4) $(files_defs) - -# Default command lines for running the code generators. -gmmproc ?= $(PERL) -I"$(GMMPROC_DIR)/pm" -- "$(GMMPROC_DIR)/gmmproc" -gen_wrap_init ?= $(PERL) -- "$(GMMPROC_DIR)/generate_wrap_init.pl" -codegen_m4_flags = $(addprefix -I , $(codegen_m4_srcdir) $(GMMPROC_EXTRA_M4_DIR)) -gmmproc_flags ?= $(codegen_m4_flags) --defs $(srcdir) - -# Automatically created output directories. -binding_mkdirs = $(binding_stampdir) $(binding_outputdir)/private - -# Show names of generated files in silent rules output. -mm_0_gen = @echo ' GEN $(binding_outputdir)/{$*.cc,$*.h,private/$*_p.h}'; -mm_v_gen = $(if $(filter 0,$(or $(V),$(AM_DEFAULT_VERBOSITY))),$(mm_0_gen)) - -# Declare the built sources main targets. -all-local: $(binding_stampfiles) $(other_built_sources) - -# Create the output directories if they do not exist already. -$(binding_mkdirs): - $(AM_V_at)$(MKDIR_P) $@ - -# Generate the wrap_init.cc file using generate_wrap_init.pl. -$(binding_outputdir)/wrap_init.cc: $(binding_relfiles_hg) $(srcdir)/Makefile.in - $(AM_V_GEN)$(gen_wrap_init) $(wrap_init_flags) $(binding_relfiles_hg) >$@ - -# Run the gmmproc code generator to produce the C++ binding code. -$(binding_stampdir)/%.stamp: %.hg %.ccg $(gmmproc_dependencies) | $(binding_mkdirs) - @: >$@ - $(mm_v_gen)$(gmmproc) $(gmmproc_flags) $* $(srcdir) $(binding_outputdir) - -# 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: -- cgit v1.2.1