Warn the user if he/she recalls a sample with EXPERIMENTAL features.
Also, print the EXPERIMENTAL status when listing the samples.
/trunk/scripts/showSamples.sh | 12 9 3 0 +++++++++---
/trunk/samples/samples.mk | 12 12 0 0 ++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
1.1 --- a/samples/samples.mk Tue Sep 02 10:47:44 2008 +0000
1.2 +++ b/samples/samples.mk Tue Sep 02 12:43:11 2008 +0000
1.3 @@ -35,6 +35,18 @@
1.4 $(CT_SAMPLES):
1.5 @echo 'Configuring for "$@"'
1.6 @$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig
1.7 + @if grep -E '^CT_EXPERIMENTAL=y$$' .config >/dev/null 2>&1; then \
1.8 + echo ''; \
1.9 + echo '***********************************************************'; \
1.10 + echo ''; \
1.11 + echo 'WARNING! This sample may enable experimental features.'; \
1.12 + echo ' Please be sure to review the configuration prior'; \
1.13 + echo ' to building and using your toolchain!'; \
1.14 + echo 'Now, you have been warned!'; \
1.15 + echo ''; \
1.16 + echo '***********************************************************'; \
1.17 + echo ''; \
1.18 + fi
1.19 @echo 'Execute "$(CT_NG) build" to build your toolchain'
1.20
1.21 $(patsubst %,copy_config_%,$(CT_SAMPLES)):
2.1 --- a/scripts/showSamples.sh Tue Sep 02 10:47:44 2008 +0000
2.2 +++ b/scripts/showSamples.sh Tue Sep 02 12:43:11 2008 +0000
2.3 @@ -18,15 +18,16 @@
2.4 local sample="$2"
2.5 if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
2.6 sample_top="${CT_TOP_DIR}"
2.7 - sample_type="local"
2.8 + sample_type="l"
2.9 else
2.10 sample_top="${CT_LIB_DIR}"
2.11 - sample_type="global"
2.12 + sample_type="g"
2.13 fi
2.14 . "${sample_top}/samples/${sample}/crosstool.config"
2.15 if [ -z "${wiki}" ]; then
2.16 printf " %-*s (%s" ${width} "${sample}" "${sample_type}"
2.17 - [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
2.18 + [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",B"
2.19 + [ "${CT_EXPERIMENTAL}" = "y" ] && printf ",X"
2.20 echo ")"
2.21 if [ ${verbose} -ne 0 ]; then
2.22 echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
2.23 @@ -129,4 +130,9 @@
2.24 if [ "${opt}" = -w ]; then
2.25 printf "^ Total: ${#@} samples | ||||||||||||"
2.26 echo ""
2.27 +elif [ -z "${opt}" ]; then
2.28 + echo ' l (local) : sample was found in current directory'
2.29 + echo ' g (global) : sample was installed with crosstool-NG'
2.30 + echo ' X (EXPERIMENTAL): sample may use EXPERIMENTAL features'
2.31 + echo ' B (BORKEN) : sample is currently broken'
2.32 fi