1.1 --- a/tools/Makefile Sun Jun 17 16:24:23 2007 +0000
1.2 +++ b/tools/Makefile Sun Jul 01 21:25:03 2007 +0000
1.3 @@ -1,11 +1,31 @@
1.4 +# Makefile for the tools/ sub-directory
1.5 +
1.6 +# Here, we can update the config.* scripts.
1.7 +# If we're in CT_LIB_DIR, then CT_LIB_DIR == CT_TOP_DIR, and we can update those
1.8 +# scripts for later inclusion mainline. If CT_LIB_DIR != CT_TOP_DIR, then those
1.9 +# scripts are downloaded only for use in CT_TOP_DIR.
1.10 +
1.11 CONFIG_SUB_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.sub"
1.12 CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub"
1.13 CONFIG_GUESS_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess"
1.14 CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess"
1.15
1.16 -updatetools:
1.17 - @wget "$(CONFIG_SUB_SRC)" -O "$(CONFIG_SUB_DEST)"
1.18 - @wget "$(CONFIG_GUESS_SRC)" -O "$(CONFIG_GUESS_DEST)"
1.19 +$(CT_TOP_DIR)/tools:
1.20 + @mkdir -p $(CT_TOP_DIR)/tools
1.21 +
1.22 +PHONY += updatetools
1.23 +updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
1.24 +
1.25 +$(CONFIG_SUB_DEST):
1.26 + @wget $(CONFIG_SUB_SRC) -O $@
1.27 + @chmod u+rwx,go+rx-w $@
1.28 +
1.29 +$(CONFIG_GUESS_DEST):
1.30 + @wget $(CONFIG_GUESS_SRC) -O $@
1.31 + @chmod u+rwx,go+rx-w $@
1.32
1.33 help-distrib::
1.34 @echo ' updatetools - Update the config tools'
1.35 +
1.36 +distclean::
1.37 + @[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/tools