mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-01 18:46:41 +00:00
Backport #975 from trunk:
Warn the user if he/she recalls a sample with EXPERIMENTAL features. Also, print the EXPERIMENTAL status when listing the samples. NB: even it is not purely a fix backport, it is still very important that the user gets warned about the EXPERIMENTAL status of the samples. /branches/1.2/scripts/showSamples.sh | 17 14 3 0 ++++++++++++++--- /branches/1.2/samples/samples.mk | 12 12 0 0 ++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-)
This commit is contained in:
parent
679e8feb9f
commit
57db77a46d
@ -35,6 +35,18 @@ PHONY += $(CT_SAMPLES)
|
|||||||
$(CT_SAMPLES):
|
$(CT_SAMPLES):
|
||||||
@echo 'Configuring for "$@"'
|
@echo 'Configuring for "$@"'
|
||||||
@$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig
|
@$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig
|
||||||
|
@if grep -E '^CT_EXPERIMENTAL=y$$' .config >/dev/null 2>&1; then \
|
||||||
|
echo ''; \
|
||||||
|
echo '***********************************************************'; \
|
||||||
|
echo ''; \
|
||||||
|
echo 'WARNING! This sample may enable experimental features.'; \
|
||||||
|
echo ' Please be sure to review the configuration prior'; \
|
||||||
|
echo ' to building and using your toolchain!'; \
|
||||||
|
echo 'Now, you have been warned!'; \
|
||||||
|
echo ''; \
|
||||||
|
echo '***********************************************************'; \
|
||||||
|
echo ''; \
|
||||||
|
fi
|
||||||
@echo 'Execute "$(CT_NG) build" to build your toolchain'
|
@echo 'Execute "$(CT_NG) build" to build your toolchain'
|
||||||
|
|
||||||
$(patsubst %,copy_config_%,$(CT_SAMPLES)):
|
$(patsubst %,copy_config_%,$(CT_SAMPLES)):
|
||||||
|
@ -18,15 +18,16 @@ dump_single_sample() {
|
|||||||
local sample="$2"
|
local sample="$2"
|
||||||
if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
|
if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
|
||||||
sample_top="${CT_TOP_DIR}"
|
sample_top="${CT_TOP_DIR}"
|
||||||
sample_type="local"
|
sample_type="l"
|
||||||
else
|
else
|
||||||
sample_top="${CT_LIB_DIR}"
|
sample_top="${CT_LIB_DIR}"
|
||||||
sample_type="global"
|
sample_type="g"
|
||||||
fi
|
fi
|
||||||
. "${sample_top}/samples/${sample}/crosstool.config"
|
. "${sample_top}/samples/${sample}/crosstool.config"
|
||||||
if [ -z "${wiki}" ]; then
|
if [ -z "${wiki}" ]; then
|
||||||
printf " %-*s (%s" ${width} "${sample}" "${sample_type}"
|
printf " %-*s (%s" ${width} "${sample}" "${sample_type}"
|
||||||
[ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
|
[ -f "${sample_top}/samples/${sample}/broken" ] && printf ",B"
|
||||||
|
[ "${CT_EXPERIMENTAL}" = "y" ] && printf ",X"
|
||||||
echo ")"
|
echo ")"
|
||||||
if [ ${verbose} -ne 0 ]; then
|
if [ ${verbose} -ne 0 ]; then
|
||||||
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
|
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
|
||||||
@ -108,3 +109,13 @@ fi
|
|||||||
for sample in "${@}"; do
|
for sample in "${@}"; do
|
||||||
( dump_single_sample ${opt} ${width} "${sample}" )
|
( dump_single_sample ${opt} ${width} "${sample}" )
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "${opt}" = -w ]; then
|
||||||
|
printf "^ Total: ${#@} samples | ||||||||||||"
|
||||||
|
echo ""
|
||||||
|
elif [ -z "${opt}" ]; then
|
||||||
|
echo ' l (local) : sample was found in current directory'
|
||||||
|
echo ' g (global) : sample was installed with crosstool-NG'
|
||||||
|
echo ' X (EXPERIMENTAL): sample may use EXPERIMENTAL features'
|
||||||
|
echo ' B (BORKEN) : sample is currently broken'
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user