From 5600e5fe3c6a8402c752caeb5e979bb6daab6b2c Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Tue, 15 Mar 2011 09:49:37 +0100 Subject: Add mm-common-util.pc so we can get doc utils from mm-common. * util/mm-common-util.pc.in: Added this file, with the path to the installed doctool/*.pl files. * configure.ac: * Makefile.am: Generate and install the .pc file. * macros/mm-doc.m4: Use the mm-common-util .pc file, not the glibmm-2.4 one. Previously, glibmm installed a copy that it got from mm-common-prepare and other modules then asked glibmm where to find its copy. That was probably for backwards compatibility. But we break stuff with gtkmm 3 anyway, so now is a good time to avoid the duplication by requiring modules to get it from mm-common instead. Actually this should only require a rerun of autogen.sh, because mm-common's own MM_CONFIG_DOCTOOL_DIR macro is what gets the path to these utils. Removing the hard-coding of glibmm-2.4 will also help us when we eventually break the glibmm ABI. --- Makefile.am | 10 ++++++++++ configure.ac | 1 + doctags/mm-common-libstdc++.pc.in | 2 +- macros/mm-doc.m4 | 16 ++++++++-------- util/mm-common-util.pc.in | 9 +++++++++ 5 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 util/mm-common-util.pc.in diff --git a/Makefile.am b/Makefile.am index ccecc72..87b82d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,7 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} bin_SCRIPTS = util/mm-common-prepare man1_MANS = util/mm-common-prepare.1 +# These are installed so that mm-common-prepare can copy them into projects at autogen.sh time: build_supportdir = $(pkgdatadir)/build dist_build_support_DATA = \ build/compile-binding.am \ @@ -28,6 +29,7 @@ dist_build_support_DATA = \ build/doc-reference.am \ build/generate-binding.am +# These are installed so that mm-common-prepare can copy them into projects at autogen.sh time: aclocal_macrodir = $(datadir)/aclocal aclocal_macro_DATA = macros/mm-common.m4 dist_aclocal_macro_DATA = \ @@ -37,6 +39,10 @@ dist_aclocal_macro_DATA = \ macros/mm-pkg.m4 \ macros/mm-warnings.m4 +# 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, +# which is preferrable. doctooldir = $(pkgdatadir)/doctool dist_doctool_DATA = \ util/doc-install.pl \ @@ -44,6 +50,10 @@ dist_doctool_DATA = \ util/doxygen.css \ util/tagfile-to-devhelp2.xsl +# Let other modules find the utils with pkg-config: +pkgconfigdir = $(libdir)/pkgconfig +nodist_pkgconfig_DATA = util/mm-common-util.pc + doctagsdir = $(pkgdatadir)/doctags dist_doctags_DATA = doctags/libstdc++.tag diff --git a/configure.ac b/configure.ac index 4bff261..8aac875 100644 --- a/configure.ac +++ b/configure.ac @@ -39,5 +39,6 @@ AC_CONFIG_FILES([Makefile doctags/mm-common-libstdc++.pc doctags/mm-common-libstdc++-uninstalled.pc macros/mm-common.m4 + util/mm-common-util.pc util/mm-common-prepare]) AC_OUTPUT diff --git a/doctags/mm-common-libstdc++.pc.in b/doctags/mm-common-libstdc++.pc.in index 6f8f458..a66a395 100644 --- a/doctags/mm-common-libstdc++.pc.in +++ b/doctags/mm-common-libstdc++.pc.in @@ -7,6 +7,6 @@ doxytagfile=${pkgdatadir}/doctags/libstdc++.tag htmlrefpub=http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/ Name: mm-common-libstdc++ -Description: GNU libstdc++ metadata module +Description: mm-common's GNU libstdc++ metadata module Version: @PACKAGE_VERSION@ URL: http://www.gtkmm.org/ diff --git a/macros/mm-doc.m4 b/macros/mm-doc.m4 index 9f236ee..5c105f3 100644 --- a/macros/mm-doc.m4 +++ b/macros/mm-doc.m4 @@ -31,13 +31,13 @@ dnl AC_MSG_CHECKING([location of documentation utilities]) AS_IF([test "x$MMDOCTOOLDIR" = x], [ - MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir glibmm-2.4 2>&AS_MESSAGE_LOG_FD` + MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir mm-common-util 2>&AS_MESSAGE_LOG_FD` AS_IF([test "[$]?" -ne 0], [AC_MSG_ERROR([[not found -The required module glibmm could not be found on this system. If you -are running a binary distribution and the glibmm package is installed, -make sure that any separate development package for glibmm is installed -as well. If you built glibmm yourself, it may be necessary to adjust +The required module mm-common-util could not be found on this system. If you +are running a binary distribution and the mm-common package is installed, +make sure that any separate development package for mm-common is installed +as well. If you built mm-common yourself, it may be necessary to adjust the PKG_CONFIG_PATH environment variable for pkg-config to find it. ]])]) ]) @@ -53,7 +53,7 @@ AC_MSG_RESULT([$MMDOCTOOLDIR])[]dnl ## ## The directory name is used by mm-common-prepare as the destination ## for copying the required files into the source tree. If you make -## use of this feature in order to avoid a dependency on glibmm, make +## use of this feature in order to avoid a dependency on mm-common, make ## sure to include the installed files in the distribution tarball of ## your package. ## @@ -91,10 +91,10 @@ AS_IF([test "x$ENABLE_DOCUMENTATION" != xno], [ mm_err= AS_IF([test "x$MMDOCTOOLDIR" = x], [mm_err='dnl -The glibmm module is available, but the installation of glibmm on this +The mm-common-util module is available, but the installation of mm-common on this machine is missing the shared documentation utilities of the GNOME C++ bindings. It may be necessary to upgrade to a more recent release of -glibmm in order to build '$PACKAGE_NAME' and install the documentation.'], +mm-common in order to build '$PACKAGE_NAME' and install the documentation.'], [test "x$PERL" = xperl], [mm_err='Perl is required for installing the documentation.'], [test "x$USE_MAINTAINER_MODE" != xno], [ diff --git a/util/mm-common-util.pc.in b/util/mm-common-util.pc.in new file mode 100644 index 0000000..218ae6e --- /dev/null +++ b/util/mm-common-util.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +datadir=@datadir@ + +doctooldir=${datadir}/mm-common/doctool + +Name: mm-common-util +Description: mm-common's doctool build utilities for the GNOME C++ bindings. +Version: @PACKAGE_VERSION@ +URL: http://www.gtkmm.org/ -- cgit v1.2.1