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(-)
1.1 --- a/tools/tools.mk Fri Nov 07 08:09:42 2008 +0000
1.2 +++ b/tools/tools.mk Thu Nov 13 17:34:44 2008 +0000
1.3 @@ -16,25 +16,37 @@
1.4 # The tools are: config.guess and config.sub
1.5
1.6 CONFIG_SUB_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
1.7 -CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub"
1.8 +CONFIG_SUB_DEST=tools/config.sub
1.9 CONFIG_GUESS_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
1.10 -CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess"
1.11 +CONFIG_GUESS_DEST=tools/config.guess
1.12
1.13 +# Kludge: we have a step that is called 'tools', and thus we can not define a
1.14 +# rule here that is named 'tools'. Naming it 'tools/' does not help either.
1.15 +# Thus, prepend the top directory to have a single rule description. This is
1.16 +# not as bad as it seems, because it is only refered to by teo rules in this
1.17 +# file, but still it is a kludge...
1.18 $(CT_TOP_DIR)/tools:
1.19 - $(SILENT)mkdir -p $(CT_TOP_DIR)/tools
1.20 + $(SILENT)mkdir -p tools
1.21
1.22 PHONY += updatetools
1.23 -updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
1.24 +updatetools: $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
1.25
1.26 # ----------------------------------------------------------
1.27 # How to retrieve the tools
1.28
1.29 -$(CONFIG_SUB_DEST):
1.30 - $(SILENT)wget $(CONFIG_SUB_SRC) -O $@
1.31 +wget_opt=-o /dev/null
1.32 +ifeq ($(strip $(V)),2)
1.33 + wget_opt=
1.34 +endif
1.35 +
1.36 +$(CONFIG_SUB_DEST): .FORCE $(CT_TOP_DIR)/tools
1.37 + @$(ECHO) ' WGET $@'
1.38 + $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC)
1.39 $(SILENT)chmod u+rwx,go+rx-w $@
1.40
1.41 -$(CONFIG_GUESS_DEST):
1.42 - $(SILENT)wget $(CONFIG_GUESS_SRC) -O $@
1.43 +$(CONFIG_GUESS_DEST): .FORCE $(CT_TOP_DIR)/tools
1.44 + @$(ECHO) ' WGET $@'
1.45 + $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC)
1.46 $(SILENT)chmod u+rwx,go+rx-w $@
1.47
1.48 # ----------------------------------------------------------