[mm-common] Download and install the libstdc++ Doxygen tags



commit 77519db7ae660e4f14380d1b1d9c7b0320357ec3
Author: Daniel Elstner <danielk openismus com>
Date:   Wed Aug 5 15:11:56 2009 +0200

    Download and install the libstdc++ Doxygen tags
    
    * tags/mm-common-libstdc++.pc.in: New pkg-config data file with meta
    information about the libstdc++ Doxygen documentation, in particular
    where to find the tag file.
    * tags/mm-common-libstdc++-uninstalled.pc.in: Likewise, but for use
    without installing.
    * configure.ac: Check for the presence of the curl and wget utilities,
    and make it mandatory in maintainer mode that at least one of them is
    available.  Add the pkg-config files to the output file list.
    * Makefile.am (tags/libstdc++.tag): New custom rule for downloading
    the libstdc++ tag file from the gcc.gnu.org website.  Install the
    pkg-config data files so that dependent modules can find the tag file
    and the location of the libstdc++ online documentation.

 .gitignore                                 |    2 ++
 Makefile.am                                |   22 ++++++++++++++++++++++
 configure.ac                               |   14 +++++++++++---
 tags/mm-common-libstdc++-uninstalled.pc.in |    7 +++++++
 tags/mm-common-libstdc++.pc.in             |   12 ++++++++++++
 5 files changed, 54 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 033fd19..06e1c3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,6 @@
 /install-sh
 /missing
 /mm-common-*.tar.*
+/tags/libstdc++.tag
+/tags/mm-common-*.pc
 /util/mm-common-prepare
diff --git a/Makefile.am b/Makefile.am
index d4cb173..23eb0d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.
 
+# Pick up aclocal flags from the environment
 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
 
 bin_SCRIPTS = util/mm-common-prepare
@@ -33,6 +34,13 @@ dist_aclocal_macro_DATA =		\
 	macros/mm-pkg.m4		\
 	macros/mm-warnings.m4
 
+doxygen_tagsdir = $(pkgdatadir)/tags
+dist_doxygen_tags_DATA = tags/libstdc++.tag
+
+shared_pkgconfigdir = $(datadir)/pkgconfig
+nodist_shared_pkgconfig_DATA = tags/mm-common-libstdc++.pc
+noinst_DATA = tags/mm-common-libstdc++-uninstalled.pc
+
 dist_noinst_DATA =			\
 	util/doc-install.pl		\
 	util/doc-postprocess.pl		\
@@ -40,4 +48,18 @@ dist_noinst_DATA =			\
 
 dist_noinst_SCRIPTS = autogen.sh
 
+MAINTAINERCLEANFILES = $(dist_doxygen_tags_DATA)
+
+curl_flags = --compressed --connect-timeout 300 -g -L -m 3600 --retry 5
+wget_flags = -T 300 -t 5
+libstdcxx_tag_url = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
+
+# Download the GNU libstdc++ Doxygen tag file from the GCC site
+tags/libstdc++.tag:
+	if test -n "$(CURL)"; then \
+	  $(CURL) $(curl_flags) -o '$@' '$(libstdcxx_tag_url)'; \
+	elif test -n "$(WGET)"; then \
+	  $(WGET) $(wget_flags) -O '$@' '$(libstdcxx_tag_url)'; \
+	fi
+
 include $(top_srcdir)/build/dist-changelog.am
diff --git a/configure.ac b/configure.ac
index dc74086..42a2a1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,13 +16,21 @@
 ## along with mm-common.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_INIT([mm-common], [0.1], [gtkmm-list gnome org], [mm-common])
-AC_PREREQ([2.62])
-
+AC_PREREQ([2.59])
 AC_CONFIG_SRCDIR([build/compile-binding.am])
 
 AM_INIT_AUTOMAKE([1.9 no-define nostdinc tar-ustar])
 AM_MAINTAINER_MODE
 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
 
-AC_CONFIG_FILES([Makefile util/mm-common-prepare])
+AC_CHECK_PROG([CURL], [curl], [curl])
+AC_CHECK_PROG([WGET], [wget], [wget])
+
+AS_IF([test "x$USE_MAINTAINER_MODE" != xno && test "x$CURL$WGET" = x],
+      [AC_MSG_FAILURE([[Either curl or wget is required to build mm-common]])])
+
+AC_CONFIG_FILES([Makefile
+                 tags/mm-common-libstdc++.pc
+                 tags/mm-common-libstdc++-uninstalled.pc
+                 util/mm-common-prepare])
 AC_OUTPUT
diff --git a/tags/mm-common-libstdc++-uninstalled.pc.in b/tags/mm-common-libstdc++-uninstalled.pc.in
new file mode 100644
index 0000000..2119df1
--- /dev/null
+++ b/tags/mm-common-libstdc++-uninstalled.pc.in
@@ -0,0 +1,7 @@
+doxytagfile=${pc_top_builddir}/tags/libstdc++.tag
+htmlrefpub=http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen
+
+Name: mm-common-libstdc++
+Description: GNU libstdc++ metadata module, not installed
+Version: @PACKAGE_VERSION@
+URL: http://www.gtkmm.org/
diff --git a/tags/mm-common-libstdc++.pc.in b/tags/mm-common-libstdc++.pc.in
new file mode 100644
index 0000000..968a676
--- /dev/null
+++ b/tags/mm-common-libstdc++.pc.in
@@ -0,0 +1,12 @@
+prefix= prefix@
+datarootdir= datarootdir@
+datadir= datadir@
+pkgdatadir=${datadir}/@PACKAGE_TARNAME@
+
+doxytagfile=${pkgdatadir}/tags/libstdc++.tag
+htmlrefpub=http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen
+
+Name: mm-common-libstdc++
+Description: GNU libstdc++ metadata module
+Version: @PACKAGE_VERSION@
+URL: http://www.gtkmm.org/



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