steps.mk
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
parent 2935 4a563f872440
child 3115 1c68438f44f7
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
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@461
    21
CT_STEPS := libc_check_config   \
yann@2936
    22
            gmp_for_build       \
yann@2936
    23
            mpfr_for_build      \
yann@2936
    24
            ppl_for_build       \
yann@2936
    25
            cloog_for_build     \
yann@2936
    26
            mpc_for_build       \
yann@2936
    27
            libelf_for_build    \
yann@2936
    28
            binutils_for_build  \
yann@2936
    29
            elf2flt_for_build   \
yann@2927
    30
            gmp_for_host        \
yann@2927
    31
            mpfr_for_host       \
yann@2927
    32
            ppl_for_host        \
yann@2927
    33
            cloog_for_host      \
yann@2927
    34
            mpc_for_host        \
yann@2927
    35
            libelf_for_host     \
yann@2926
    36
            binutils_for_host   \
yann@2926
    37
            elf2flt_for_host    \
yann@2926
    38
            sstrip_for_host     \
yann@461
    39
            cc_core_pass_1      \
yann@2304
    40
            kernel_headers      \
yann@461
    41
            libc_start_files    \
yann@461
    42
            cc_core_pass_2      \
yann@461
    43
            libc                \
yann@2936
    44
            cc_for_build        \
yann@2935
    45
            cc_for_host         \
yann@461
    46
            libc_finish         \
yann@2905
    47
            libelf_for_target   \
yann@2906
    48
            binutils_for_target \
yann@461
    49
            debug               \
mgl@1965
    50
            test_suite          \
yann@1149
    51
            finish              \
yann@461
    52
yann@2936
    53
# Keep an empty line above this comment, so the last
yann@2936
    54
# back-slash terminated line works as expected.
yann@2936
    55
yann@1143
    56
# Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
yann@461
    57
export CT_STEPS
yann@181
    58
yann@1001
    59
# Print the steps list
yann@1001
    60
PHONY += list-steps
yann@1001
    61
list-steps:
yann@1001
    62
	@echo  'Available build steps, in order:'
yann@1001
    63
	@for step in $(CT_STEPS); do    \
yann@1001
    64
	     echo "  - $${step}";       \
yann@1001
    65
	 done
yann@1001
    66
	@echo  'Use "<step>" as action to execute only that step.'
yann@1001
    67
	@echo  'Use "+<step>" as action to execute up to that step.'
yann@1001
    68
	@echo  'Use "<step>+" as action to execute from that step onward.'
yann@1001
    69
yann@1001
    70
# ----------------------------------------------------------
yann@1001
    71
# This part deals with executing steps
yann@1001
    72
yann@181
    73
$(CT_STEPS):
yann@1010
    74
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
yann@136
    75
yann@304
    76
$(patsubst %,+%,$(CT_STEPS)):
yann@1010
    77
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
yann@136
    78
yann@304
    79
$(patsubst %,%+,$(CT_STEPS)):
yann@1010
    80
	$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build