summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--docs/overview.txt40
-rwxr-xr-xscripts/crosstool.sh4
-rw-r--r--scripts/functions9
4 files changed, 54 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2dc3629..1e86f70 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ export CT_TOP_DIR=$(shell pwd)
# This is crosstool-ng version string
export CT_VERSION=$(shell cat $(CT_TOP_DIR)/version)
+export CT_STOP=$(STOP)
export CT_RESTART=$(RESTART)
.PHONY: all
@@ -35,8 +36,11 @@ help::
@echo 'Distribution targets:'
@echo ' tarball - Build a tarball of the configured toolchain'
@echo
+ @echo 'Environement variables:'
+ @echo ' STOP - Stop the build just after this step'
+ @echo ' RESTART - Restart the build just before this step'
+ @echo
@echo 'Execute "make" or "make all" to build all targets marked with [*]'
- @echo 'Pass RESTART=<step> to restart a previously saved step (read doc first!)'
.config: $(CONFIG_FILES) $(CT_TOP_DIR)/config/debug.in
@make oldconfig
diff --git a/docs/overview.txt b/docs/overview.txt
index 1ddf418..1425ed6 100644
--- a/docs/overview.txt
+++ b/docs/overview.txt
@@ -95,13 +95,46 @@ where you want it installed, what architecture and specific processor it
will support, the version of the components you want to use, etc... The
value for those options are then stored in a configuration file.
-You then simply run make. It will use this configuration file to retrieve,
-extract and patch the components, build, install and test your newly built
-toolchain.
+To enter the menu, type:
+ make menuconfig
+
+To build the so-configured target, simply type:
+ make
+
+This will use the above configuration to retrieve, extract and patch the
+components, build, install and eventually test your newly built toolchain.
You are then free to add the toolchain /bin directory in your PATH to use
it at will.
+In any case, you can get some terse help. Just type:
+ make help
+
+
+Stoping and restarting a build |
+-------------------------------*
+
+If you want to stop the build after a step you are debugging, you can pass the
+variable STOP to make:
+ make STOP=some_step
+
+Conversely, if you want to restart a build at a specific step you are
+debugging, you can pass the RESTART variable to make:
+ make RESTART=some_step
+
+The list of steps is, in order of appearence in the build process:
+ - libc_check_config
+ - kernel_check_config
+ - kernel_headers
+ - binutils
+ - libc_headers
+ - cc_core
+ - libfloat
+ - libc
+ - cc
+ - libc_finish
+ - debug
+
____________________________
/
Configuring crosstool-NG /
@@ -135,6 +168,7 @@ CT_VERSION:
The version of crosstool-NG you are using. Not much help for you, but it's
there if you need it.
+
Interesting config options |
---------------------------*
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index 9053299..8c78e57 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -410,6 +410,10 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
fi
if [ ${do_it} -eq 1 ]; then
do_${step}
+ if [ "${CT_STOP}" = "${step}" ]; then
+ CT_DoLog ERROR "Stopping just after step \"${step}\", as requested."
+ exit 0
+ fi
if [ "${CTDEBUG_CT_PAUSE_STEPS}" = "y" ]; then
CT_DoPause "Step \"${step}\" finished"
fi
diff --git a/scripts/functions b/scripts/functions
index 71eac4f..dcf4160 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -519,12 +519,14 @@ CT_DoSaveState() {
CT_DoLoadState(){
local state_name="$1"
local state_dir="${CT_STATE_DIR}/${state_name}"
+ local old_RESTART="${CT_RESTART}"
+ local old_STOP="${CT_STOP}"
# We need to do something special with the log file!
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
exec >"${state_dir}/tail.log"
fi
- CT_DoLog DEBUG "Restoring state at step \"${state_name}\"..."
+ CT_DoLog INFO "Restoring state at step \"${state_name}\", as requested."
case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
y) tar_opt=xzf; tar_ext=".tar.gz";;
@@ -551,6 +553,11 @@ CT_DoLoadState(){
CT_DoLog DEBUG " Restoring environment"
. "${state_dir}/env.sh" >/dev/null 2>&1 || true
+ # Restore the new RESTART and STOP steps
+ CT_RESTART="${old_RESTART}"
+ CT_STOP="${old_STOP}"
+ unset old_stop old_restart
+
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
CT_DoLog DEBUG " Restoring log file"
exec >/dev/null