steps.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 940 f0f9ba3f98f2
child 1010 45316336f45f
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 each steps
     2 # Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 
     4 # ----------------------------------------------------------
     5 # This is the steps help entry
     6 
     7 help-build::
     8 	@echo  '  list-steps         - List all build steps'
     9 
    10 # ----------------------------------------------------------
    11 # The steps list
    12 
    13 # Please keep the last line with a '\' and keep the folowing empy line:
    14 # it helps when diffing and merging.
    15 CT_STEPS := libc_check_config   \
    16             kernel_headers      \
    17             gmp                 \
    18             mpfr                \
    19             binutils            \
    20             cc_core_pass_1      \
    21             libc_headers        \
    22             libc_start_files    \
    23             cc_core_pass_2      \
    24             libc                \
    25             cc                  \
    26             libc_finish         \
    27             binutils_target     \
    28             gmp_target          \
    29             mpfr_target         \
    30             tools               \
    31             debug               \
    32 
    33 # Make the list available to sub-processes (scripts/crosstool.sh needs it)
    34 export CT_STEPS
    35 
    36 # Print the steps list
    37 PHONY += list-steps
    38 list-steps:
    39 	@echo  'Available build steps, in order:'
    40 	@for step in $(CT_STEPS); do    \
    41 	     echo "  - $${step}";       \
    42 	 done
    43 	@echo  'Use "<step>" as action to execute only that step.'
    44 	@echo  'Use "+<step>" as action to execute up to that step.'
    45 	@echo  'Use "<step>+" as action to execute from that step onward.'
    46 
    47 # ----------------------------------------------------------
    48 # This part deals with executing steps
    49 
    50 $(CT_STEPS):
    51 	$(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$@ STOP=$@ build
    52 
    53 $(patsubst %,+%,$(CT_STEPS)):
    54 	$(SILENT)$(MAKE) -rf $(CT_NG) STOP=$(patsubst +%,%,$@) build
    55 
    56 $(patsubst %,%+,$(CT_STEPS)):
    57 	$(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$(patsubst %+,%,$@) build