steps.mk
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Oct 29 10:31:15 2008 +0000 (2008-10-29)
changeset 1010 45316336f45f
parent 1001 c8ac48ba1411
child 1015 d9a132dcd329
permissions -rw-r--r--
Use $(MAKE) for recursive calls, don't directly use $(CT_NG).
Pass on the V variable on the $(MAKE) command lines.

/trunk/steps.mk | 6 3 3 0 +++---
/trunk/ct-ng.in | 2 1 1 0 +-
2 files changed, 4 insertions(+), 4 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) V=$(V) RESTART=$@ STOP=$@ build
    52 
    53 $(patsubst %,+%,$(CT_STEPS)):
    54 	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
    55 
    56 $(patsubst %,%+,$(CT_STEPS)):
    57 	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build