[mm-common] Skip the check for remote updates on make install
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mm-common] Skip the check for remote updates on make install
- Date: Thu, 6 Aug 2009 08:52:21 +0000 (UTC)
commit 682c543bd653eaa3eff359d9d565f7c5dcda39d1
Author: Daniel Elstner <daniel kitta gmail com>
Date: Thu Aug 6 10:37:03 2009 +0200
Skip the check for remote updates on make install
* Makefile.am: Clean up and add a few more comments.
(check_updates): Declare the download targets phony only when building
the default make target. This avoids triggering the download again on
make install.
* configure.ac (CURL), (WGET): Call AC_ARG_VAR() on these variables.
(AC_CONFIG_SRCDIR): Check for the file util/mm-common-prepare.in since
it is more likely to be unique to this module.
Makefile.am | 21 +++++++++++++--------
configure.ac | 9 ++++++---
2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 052677d..759e47d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +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
+# Pick up aclocal flags from the environment.
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
bin_SCRIPTS = util/mm-common-prepare
@@ -50,26 +50,31 @@ dist_noinst_SCRIPTS = autogen.sh
MAINTAINERCLEANFILES = $(dist_doxygen_tags_DATA)
+# Remote location of the GNU libstdc++ Doxygen tag file.
libstdcxx_tag_url = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
+# Commands for downloading a target from a remote location, taking care
+# not to download a file again if its time stamp has not changed.
download_curl = $(CURL) --compressed --connect-timeout 300 -g -L -m 3600 -R --retry 5 \
$(if $(wildcard $@),-z '$@') -o '$@'
-download_wget = $(WGET) -N -T 300 -t 5 -P tags
+download_wget = $(WGET) -N -nd -T 300 -t 5 -P '$(@D)'
-# In maintainer mode, always check the tag file for updates.
+# If maintainer mode is enabled, always check the remote locations
+# of the tag files for updates when building the default target.
if MAINTAINER_MODE
-tagfile_phony = $(dist_doxygen_tags_DATA)
+check_updates = $(if $(MAKECMDGOALS:all%=),,$(dist_doxygen_tags_DATA))
else
-tagfile_phony =
+check_updates =
endif
-.PHONY: $(tagfile_phony)
+.PHONY: $(check_updates)
+# Avoid shipping partially downloaded files.
.DELETE_ON_ERROR:
-# Download the GNU libstdc++ Doxygen tag file from the GCC site.
+# Download the libstdc++ tag file from the GCC website.
tags/libstdc++.tag:
$(if $(CURL),$(download_curl) '$(libstdcxx_tag_url)',$(if\
- $(WGET),$(download_wget) '$(libstdcxx_tag_url)',exit 1))
+ $(WGET),$(download_wget) '$(libstdcxx_tag_url)',test -f '$@'))
include $(top_srcdir)/build/dist-changelog.am
diff --git a/configure.ac b/configure.ac
index ad4fe77..8ecfd66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,17 +17,20 @@
AC_INIT([mm-common], [0.1], [gtkmm-list gnome org], [mm-common])
AC_PREREQ([2.59])
-AC_CONFIG_SRCDIR([build/compile-binding.am])
+AC_CONFIG_SRCDIR([util/mm-common-prepare.in])
-AM_INIT_AUTOMAKE([1.9 -Wno-portability no-define nostdinc tar-ustar])
+AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define std-options tar-ustar])
AM_MAINTAINER_MODE
+
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
+AC_ARG_VAR([CURL], [curl transfer command])
+AC_ARG_VAR([WGET], [wget download command])
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_MSG_FAILURE([[Either curl or wget is required for building mm-common.]])])
AC_CONFIG_FILES([Makefile
tags/mm-common-libstdc++.pc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]