steps.mk
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Mar 19 18:46:57 2010 +0100 (2010-03-19)
changeset 1846 4220dec659c6
parent 1384 b23f3c2e0c73
child 1854 02b74bd4373f
permissions -rw-r--r--
scripts: fix dumping the config for companion libraries for target

Companion libraries can be disable for the host, but still used for
the target (eg. binutils or gdb). Dump the version also in this case.
     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 help-env::
    11 	@echo  '  STOP               - Stop the build just after this step'
    12 	@echo  '  RESTART            - Restart the build just before this step'
    13 
    14 # ----------------------------------------------------------
    15 # The steps list
    16 
    17 # Please keep the last line with a '\' and keep the following empy line:
    18 # it helps when diffing and merging.
    19 CT_STEPS := libc_check_config   \
    20             kernel_headers      \
    21             gmp                 \
    22             mpfr                \
    23             ppl                 \
    24             cloog               \
    25             mpc                 \
    26             libelf              \
    27             binutils            \
    28             elf2flt             \
    29             cc_core_pass_1      \
    30             libc_headers        \
    31             libc_start_files    \
    32             cc_core_pass_2      \
    33             libc                \
    34             cc                  \
    35             libc_finish         \
    36             gmp_target          \
    37             mpfr_target         \
    38             libelf_target       \
    39             binutils_target     \
    40             tools               \
    41             debug               \
    42             finish              \
    43 
    44 # Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
    45 export CT_STEPS
    46 
    47 # Print the steps list
    48 PHONY += list-steps
    49 list-steps:
    50 	@echo  'Available build steps, in order:'
    51 	@for step in $(CT_STEPS); do    \
    52 	     echo "  - $${step}";       \
    53 	 done
    54 	@echo  'Use "<step>" as action to execute only that step.'
    55 	@echo  'Use "+<step>" as action to execute up to that step.'
    56 	@echo  'Use "<step>+" as action to execute from that step onward.'
    57 
    58 # ----------------------------------------------------------
    59 # This part deals with executing steps
    60 
    61 $(CT_STEPS):
    62 	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
    63 
    64 $(patsubst %,+%,$(CT_STEPS)):
    65 	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
    66 
    67 $(patsubst %,%+,$(CT_STEPS)):
    68 	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build