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