1.1 --- a/Makefile.in Tue May 12 06:07:41 2009 +0000
1.2 +++ b/Makefile.in Wed May 13 18:10:47 2009 +0000
1.3 @@ -102,7 +102,7 @@
1.4 #--------------------------------------
1.5 # Build rules
1.6
1.7 -build-bin: ct-ng scripts/crosstool-NG.sh scripts/saveSample.sh
1.8 +build-bin: ct-ng scripts/crosstool-NG.sh scripts/saveSample.sh scripts/showTuple.sh
1.9 @chmod 755 $^
1.10
1.11 build-lib: paths.mk
1.12 @@ -151,6 +151,8 @@
1.13 @rm -f scripts/crosstool-NG.sh
1.14 @echo " RM 'script/saveSample.sh'"
1.15 @rm -f scripts/saveSample.sh
1.16 + @echo " RM 'script/showTuple.sh'"
1.17 + @rm -f scripts/showTuple.sh
1.18
1.19 clean-lib:
1.20 @echo " RM 'paths.mk'"
2.1 --- a/ct-ng.comp Tue May 12 06:07:41 2009 +0000
2.2 +++ b/ct-ng.comp Wed May 13 18:10:47 2009 +0000
2.3 @@ -16,7 +16,7 @@
2.4
2.5 actions='help menuconfig oldconfig saveconfig
2.6 build build. build-all build-all.
2.7 - list-samples list-steps
2.8 + list-samples list-steps show-tuple
2.9 clean distclean wiki-samples updatetools
2.10 tarball version'
2.11
3.1 --- a/ct-ng.in Tue May 12 06:07:41 2009 +0000
3.2 +++ b/ct-ng.in Wed May 13 18:10:47 2009 +0000
3.3 @@ -111,6 +111,9 @@
3.4 include $(CT_LIB_DIR)/samples/samples.mk
3.5 include $(CT_LIB_DIR)/scripts/scripts.mk
3.6
3.7 +help-config::
3.8 + @echo ' show-tuple - Print the tuple of the currently configured toolchain'
3.9 +
3.10 help-distrib::
3.11 @echo ' tarball - Build a tarball of the configured toolchain'
3.12
3.13 @@ -119,9 +122,14 @@
3.14 # End help system
3.15
3.16 .config:
3.17 - @echo ' There is no existing .config file!'
3.18 + @echo "There is no existing .config file!"
3.19 + @echo "You need to either run 'menuconfig',"
3.20 + @echo "or configure an existing sample."
3.21 @false
3.22
3.23 +show-tuple: .config
3.24 + $(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showTuple.sh
3.25 +
3.26 # Actual build
3.27 build: .config
3.28 $(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/scripts/showTuple.sh.in Wed May 13 18:10:47 2009 +0000
4.3 @@ -0,0 +1,30 @@
4.4 +#!@@CT_bash@@
4.5 +
4.6 +# What we need:
4.7 +# - the .config file
4.8 +
4.9 +# Parse the tools' paths configuration
4.10 +. "${CT_LIB_DIR}/paths.mk"
4.11 +
4.12 +# We'll need the stdout later, save it
4.13 +exec 7>&1
4.14 +
4.15 +# Parse the common functions
4.16 +. "${CT_LIB_DIR}/scripts/functions"
4.17 +
4.18 +# Don't care about any log file
4.19 +exec >/dev/null
4.20 +rm -f "${tmp_log_file}"
4.21 +
4.22 +# Parse the configuration file
4.23 +. .config
4.24 +
4.25 +# Parse architecture and kernel specific functions
4.26 +. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
4.27 +. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
4.28 +
4.29 +# Build CT_TARGET
4.30 +CT_DoBuildTargetTuple
4.31 +
4.32 +# All this for this single echo... :-( Sigh, I'll have to re-arrange things...
4.33 +echo "${CT_TARGET}" >&7