Implement a restart facility.
If you select to debug ct-ng, then you have two new options:
- DEBUG_CT_PAUSE_STEPS : pause between every steps,
- DEBUG_CT_SAVE_STEPS : save state between every steps.
To restart a saved state, just set the RESTART make variable when calling make:
- make RESTART=<step_name>
1 # Makefile for crosstool-NG.
2 # Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
4 # Don't print directory as we descend into them
5 MAKEFLAGS += --no-print-directory
7 export CT_TOP_DIR=$(shell pwd)
9 # This is crosstool-ng version string
10 export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version)
12 export CT_RESTART=$(RESTART)
17 HOST_CC = gcc -funsigned-char
20 @echo 'Available make targets:'
23 include $(CT_TOP_DIR)/kconfig/Makefile
24 include $(CT_TOP_DIR)/samples/Makefile
27 @echo 'Build targets:'
28 @echo '* build - Build the toolchain'
29 @echo ' tarball - Build a tarball of the configured toolchain'
30 @echo ' clean - Remove generated files'
31 @echo ' distclean - Remove generated files, configuration and build directories'
33 include $(CT_TOP_DIR)/tools/Makefile
36 @echo 'Execute "make" or "make all" to build all targets marked with [*]'
37 @echo 'Pass RESTART=<step> to restart a previously saved step (read doc first!)'
39 .config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
44 @$(CT_TOP_DIR)/scripts/crosstool.sh
48 @$(CT_TOP_DIR)/scripts/tarball.sh
52 @rm -f .config* ..config.tmp
53 @rm -rf "$(CT_TOP_DIR)/targets"