tools/tools.mk
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Oct 27 18:42:26 2008 +0000 (2008-10-27)
changeset 1001 c8ac48ba1411
parent 953 edd62c121892
child 1039 b534a133daf4
permissions -rw-r--r--
Enhance the make fragments:
- comment the different parts
- re-order the code so that it is homogeneous amogst fragments
- eye-candy in some existing comments

/trunk/tools/tools.mk | 17 15 2 0 +++++++++++++++--
/trunk/steps.mk | 38 26 12 0 ++++++++++++++++++++++++++------------
/trunk/samples/samples.mk | 41 28 13 0 ++++++++++++++++++++++++++++-------------
/trunk/config/config.mk | 2 1 1 0 +-
4 files changed, 70 insertions(+), 28 deletions(-)
     1 # Makefile for the tools/ sub-directory
     2 
     3 # Here, we can update the config.* scripts.
     4 # If we're in CT_LIB_DIR, then CT_LIB_DIR == CT_TOP_DIR, and we can update those
     5 # scripts for later inclusion mainline. If CT_LIB_DIR != CT_TOP_DIR, then those
     6 # scripts are downloaded only for use in CT_TOP_DIR.
     7 
     8 # ----------------------------------------------------------
     9 # The tools help entry
    10 
    11 help-distrib::
    12 	@echo  '  updatetools        - Update the config tools'
    13 
    14 # ----------------------------------------------------------
    15 # Where to get tools from, and where to store them into
    16 # The tools are: config.guess and config.sub
    17 
    18 CONFIG_SUB_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
    19 CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub"
    20 CONFIG_GUESS_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
    21 CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess"
    22 
    23 $(CT_TOP_DIR)/tools:
    24 	$(SILENT)mkdir -p $(CT_TOP_DIR)/tools
    25 
    26 PHONY += updatetools
    27 updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
    28 
    29 # ----------------------------------------------------------
    30 # How to retrieve the tools
    31 
    32 $(CONFIG_SUB_DEST):
    33 	$(SILENT)wget $(CONFIG_SUB_SRC) -O $@
    34 	$(SILENT)chmod u+rwx,go+rx-w $@
    35 
    36 $(CONFIG_GUESS_DEST):
    37 	$(SILENT)wget $(CONFIG_GUESS_SRC) -O $@
    38 	$(SILENT)chmod u+rwx,go+rx-w $@
    39 
    40 # ----------------------------------------------------------
    41 # Clean up the mess
    42 
    43 distclean::
    44 	@$(ECHO) "  CLEAN tools"
    45 	$(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/tools