steps.mk
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Wed Oct 02 20:06:18 2013 +0200 (2013-10-02)
branch1.19
changeset 3238 d39abd309eb7
parent 3123 6a5946fbc728
permissions -rw-r--r--
1.19: update version to 1.19.0+hg

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@136
     1
# Makefile for each steps
yann@2908
     2
# Copyright 2006 Yann E. MORIN <yann.morin.1998@free.fr>
yann@136
     3
yann@1001
     4
# ----------------------------------------------------------
yann@1001
     5
# This is the steps help entry
yann@1001
     6
yann@1001
     7
help-build::
yann@1001
     8
	@echo  '  list-steps         - List all build steps'
yann@1001
     9
yann@1015
    10
help-env::
yann@1876
    11
	@echo  '  STOP=step          - Stop the build just after this step (list with list-steps)'
yann@1876
    12
	@echo  '  RESTART=step       - Restart the build just before this step (list with list-steps)'
yann@1015
    13
yann@1001
    14
# ----------------------------------------------------------
yann@1001
    15
# The steps list
yann@1001
    16
yann@2936
    17
# The _for_build steps are noop for native and cross,
yann@2936
    18
# but are actual steps for canadian and cross-native.
yann@1149
    19
# Please keep the last line with a '\' and keep the following empy line:
yann@1001
    20
# it helps when diffing and merging.
Yann@3115
    21
CT_STEPS := libc_check_config        \
Yann@3115
    22
            companion_libs_for_build \
Yann@3115
    23
            binutils_for_build       \
Yann@3115
    24
            companion_libs_for_host  \
Yann@3115
    25
            binutils_for_host        \
Yann@3115
    26
            cc_core_pass_1           \
Yann@3115
    27
            kernel_headers           \
Yann@3115
    28
            libc_start_files         \
Yann@3115
    29
            cc_core_pass_2           \
Yann@3115
    30
            libc                     \
Yann@3115
    31
            cc_for_build             \
Yann@3115
    32
            cc_for_host              \
Yann@3115
    33
            libelf_for_target        \
Yann@3115
    34
            binutils_for_target      \
Yann@3115
    35
            debug                    \
Yann@3115
    36
            test_suite               \
Yann@3115
    37
            finish                   \
yann@461
    38
yann@2936
    39
# Keep an empty line above this comment, so the last
yann@2936
    40
# back-slash terminated line works as expected.
yann@2936
    41
yann@1143
    42
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
yann@461
    43
export CT_STEPS
yann@181
    44
yann@1001
    45
# Print the steps list
yann@1001
    46
PHONY += list-steps
yann@1001
    47
list-steps:
yann@1001
    48
	@echo  'Available build steps, in order:'
yann@1001
    49
	@for step in $(CT_STEPS); do    \
yann@1001
    50
	     echo "  - $${step}";       \
yann@1001
    51
	 done
yann@1001
    52
	@echo  'Use "<step>" as action to execute only that step.'
yann@1001
    53
	@echo  'Use "+<step>" as action to execute up to that step.'
yann@1001
    54
	@echo  'Use "<step>+" as action to execute from that step onward.'
yann@1001
    55
yann@1001
    56
# ----------------------------------------------------------
yann@1001
    57
# This part deals with executing steps
yann@1001
    58
yann@181
    59
$(CT_STEPS):
yann@1010
    60
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
yann@136
    61
yann@304
    62
$(patsubst %,+%,$(CT_STEPS)):
yann@1010
    63
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
yann@136
    64
yann@304
    65
$(patsubst %,%+,$(CT_STEPS)):
yann@1010
    66
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build