yann@1101: # Makefile for the scripts/ sub-directory yann@1101: yann@1101: # Here, we can update the config.* scripts. yann@1101: # If we're in CT_LIB_DIR, then CT_LIB_DIR == CT_TOP_DIR, and we can update those yann@1101: # scripts for later inclusion mainline. If CT_LIB_DIR != CT_TOP_DIR, then those yann@1101: # scripts are downloaded only for use in CT_TOP_DIR. yann@1101: yann@1101: # ---------------------------------------------------------- yann@1101: # The tools help entry yann@1101: yann@1101: help-distrib:: yann@1101: @echo ' updatetools - Update the config tools' yann@1101: yann@1101: # ---------------------------------------------------------- yann@1101: # Where to get tools from, and where to store them into yann@1101: # The tools are: config.guess and config.sub yann@1101: yann@1101: CONFIG_SUB_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" yann@1101: CONFIG_SUB_DEST=scripts/config.sub yann@1101: CONFIG_GUESS_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" yann@1101: CONFIG_GUESS_DEST=scripts/config.guess yann@1101: yann@1101: PHONY += updatetools yann@1101: updatetools: $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST) yann@1101: yann@1101: # ---------------------------------------------------------- yann@1101: # How to retrieve the tools yann@1101: yann@1101: wget_opt=-o /dev/null yann@1101: ifeq ($(strip $(V)),2) yann@1101: wget_opt= yann@1101: endif yann@1101: yann@1101: PHONY += scripts yann@1101: scripts: yann@1620: @$(ECHO) ' MKDIR $@' yann@1620: $(SILENT)mkdir -p $@ yann@1101: yann@1618: $(CONFIG_SUB_DEST): scripts FORCE yann@1101: @$(ECHO) ' WGET $@' yann@1101: $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC) yann@1101: $(SILENT)chmod u+rwx,go+rx-w $@ yann@1101: yann@1618: $(CONFIG_GUESS_DEST): scripts FORCE yann@1101: @$(ECHO) ' WGET $@' yann@1101: $(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC) yann@1101: $(SILENT)chmod u+rwx,go+rx-w $@ yann@1101: yann@1101: # ---------------------------------------------------------- yann@1101: # Clean up the mess yann@1101: yann@1101: distclean:: yann@1101: @$(ECHO) " CLEAN scripts" yann@1101: $(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/scripts