summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-11-13 17:34:44 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-11-13 17:34:44 (GMT)
commitef0e776b9e1ead12459a4fc5d42071c651ae5cd8 (patch)
tree81bfc9b90876e3a0e017fe87765f85a5ce54fa4b
parentf9f70c5ad6115b6b65c8ea18a054a3619f4891e9 (diff)
Make the 'updatetools' rule conform to the V={,0,1,2} verbosity level.
/trunk/tools/tools.mk | 28 20 8 0 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
-rw-r--r--tools/tools.mk28
1 files changed, 20 insertions, 8 deletions
diff --git a/tools/tools.mk b/tools/tools.mk
index 9502664..e7cf1f0 100644
--- a/tools/tools.mk
+++ b/tools/tools.mk
@@ -16,25 +16,37 @@ help-distrib::
# The tools are: config.guess and config.sub
CONFIG_SUB_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
-CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub"
+CONFIG_SUB_DEST=tools/config.sub
CONFIG_GUESS_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
-CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess"
+CONFIG_GUESS_DEST=tools/config.guess
+# Kludge: we have a step that is called 'tools', and thus we can not define a
+# rule here that is named 'tools'. Naming it 'tools/' does not help either.
+# Thus, prepend the top directory to have a single rule description. This is
+# not as bad as it seems, because it is only refered to by teo rules in this
+# file, but still it is a kludge...
$(CT_TOP_DIR)/tools:
- $(SILENT)mkdir -p $(CT_TOP_DIR)/tools
+ $(SILENT)mkdir -p tools
PHONY += updatetools
-updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
+updatetools: $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
# ----------------------------------------------------------
# How to retrieve the tools
-$(CONFIG_SUB_DEST):
- $(SILENT)wget $(CONFIG_SUB_SRC) -O $@
+wget_opt=-o /dev/null
+ifeq ($(strip $(V)),2)
+ wget_opt=
+endif
+
+$(CONFIG_SUB_DEST): .FORCE $(CT_TOP_DIR)/tools
+ @$(ECHO) ' WGET $@'
+ $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
-$(CONFIG_GUESS_DEST):
- $(SILENT)wget $(CONFIG_GUESS_SRC) -O $@
+$(CONFIG_GUESS_DEST): .FORCE $(CT_TOP_DIR)/tools
+ @$(ECHO) ' WGET $@'
+ $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
# ----------------------------------------------------------