From d5db172ef497472211ba081b70b2c8aad8ccbd89 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 17 Jul 2007 21:44:33 +0000 Subject: 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 >$@ @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 diff --git a/tools/ct-ng.extract-config b/tools/ct-ng.extract-config deleted file mode 100755 index 8221d86..0000000 --- a/tools/ct-ng.extract-config +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# This scripts extracts a crosstool-NG configuration from the log file -# of a toolchain build with crosstool-NG. - -# Usage: $0 - -cat "$1" |awk ' -BEGIN { - dump = 0; -} - -$0~/Dumping crosstool-NG configuration: done in.+s$/ { - dump = 0; -} - -dump == 1 { $1 = "" } -dump == 1 - -$0~/Dumping crosstool-NG configuration$/ { - dump = 1; -} -' |cut -d ' ' -f 2- diff --git a/tools/extract-config.sh b/tools/extract-config.sh new file mode 100755 index 0000000..b5c77c6 --- /dev/null +++ b/tools/extract-config.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This scripts extracts a crosstool-NG configuration from the log file +# of a toolchain build with crosstool-NG. + +# Usage: cat |$0 + +awk ' +BEGIN { + dump = 0; +} + +$0~/Dumping crosstool-NG configuration: done in.+s$/ { + dump = 0; +} + +dump == 1 { $1 = "" } +dump == 1 + +$0~/Dumping crosstool-NG configuration$/ { + dump = 1; +} +' |cut -d ' ' -f 2- -- cgit v0.10.2-6-g49f6