Revisit the extract-config way of working: ct-ng is the sole entry point to crosstool-NG, and ct-ng.extrac-config no longer exists. You now have to call "ct-ng extractconfig </path/to/your/build.log" instead.

This commit is contained in:
Yann E. MORIN" 2007-07-17 21:44:33 +00:00
parent 3f4ac101f2
commit d5db172ef4
4 changed files with 27 additions and 7 deletions

View File

@ -66,11 +66,9 @@ clean-doc:
#--------------------------------------
# Install rules
install-bin: install-lib $(BINDIR)
install-bin: $(BINDIR)
@echo " INST ct-ng"
@install -m 755 ct-ng $(BINDIR)/ct-ng
@echo " LN ct-ng.extract-config"
@ln -sf $(LIBDIR)/tools/ct-ng.extract-config $(BINDIR)/ct-ng.extract-config
install-lib: $(LIBDIR) install-lib-main install-lib-samples

View File

@ -165,6 +165,22 @@ CT_BROKEN:
brave enough, you can try and debug them. They are hidden behind CT_BROKEN,
which itself is hiddent behind EXPERIMENTAL.
Re-building an existing toolchain |
----------------------------------+
If you have an existing toolchain, you can re-use the options used to build it
to create a new toolchain. That needs a very little bit of effort on your side
but is quite easy. The options to build a toolchain are saved in the build log
file that is saved within the toolchain. crosstool-NG can extract those options
to recreate a new configuration:
ct-ng extractconfig </path/to/your/build.log
will extract those options, prompt you for the new ones, which you can later
edit with menuconfig.
Of course, if your build log was compressed, you'd have to use something like:
bzcat /path/to/your/build.log.bz2 |ct-ng extractconfig
________________________
/
Running crosstool-NG /

View File

@ -7,7 +7,7 @@ export PROJECTVERSION=$(CT_VERSION)
KCONFIG_TOP = config/config.in
obj = $(CT_TOP_DIR)/kconfig
PHONY += clean help oldconfig menuconfig config defoldconfig
PHONY += clean help oldconfig menuconfig config defoldconfig extractconfig
# Darwin (MacOS-X) does not have proper libintl support
ifeq ($(shell uname -s),Darwin)
@ -51,7 +51,7 @@ $(CT_TOP_DIR)/config.gen/tools.in:: $(TOOLS_CONFIG_FILES)
done >>$@
@echo "endmenu" >>$@
config menuconfig oldconfig defoldconfig:: $(KCONFIG_TOP)
config menuconfig oldconfig defoldconfig extractconfig:: $(KCONFIG_TOP)
$(KCONFIG_TOP):
@ln -s $(CT_LIB_DIR)/config config
@ -68,11 +68,17 @@ oldconfig:: $(obj)/conf $(CONFIG_FILES)
defoldconfig:: $(obj)/conf $(CONFIG_FILES)
@yes "" |$< -s $(KCONFIG_TOP) >/dev/null
extractconfig:: $(obj)/conf $(CONFIG_FILES)
@$(CT_LIB_DIR)/tools/extract-config.sh >.config
@$< -s $(KCONFIG_TOP)
# Help text used by make help
help-config::
@echo ' config - Update current config using a line-oriented program'
@echo ' menuconfig - Update current config using a menu based program'
@echo ' oldconfig - Update current config using a provided .config as base'
@echo ' extractconfig - Create a new config using options extracted from a'
@echo ' build log piped into stdin'
# Cheesy build

View File

@ -3,9 +3,9 @@
# This scripts extracts a crosstool-NG configuration from the log file
# of a toolchain build with crosstool-NG.
# Usage: $0 <logfile>
# Usage: cat <logfile> |$0
cat "$1" |awk '
awk '
BEGIN {
dump = 0;
}