From ef0e776b9e1ead12459a4fc5d42071c651ae5cd8 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 13 Nov 2008 17:34:44 +0000 Subject: 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(-) 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 $@ # ---------------------------------------------------------- -- cgit v0.10.2-6-g49f6