mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-03-03 04:18:36 +00:00
Add a new rule to build the sample table ready to include in the WiKi.
/trunk/scripts/showSamples.sh | 81 53 28 0 ++++++++++++++++++++++++++++++++----------------- /trunk/samples/samples.mk | 6 6 0 0 ++++ 2 files changed, 59 insertions(+), 28 deletions(-)
This commit is contained in:
parent
d9382df091
commit
e08c8fa12a
@ -20,6 +20,9 @@ help-build::
|
|||||||
@echo ' regtest-local[.#] - Regtest-build all local samples'
|
@echo ' regtest-local[.#] - Regtest-build all local samples'
|
||||||
@echo ' regtest-global[.#] - Regtest-build all global samples'
|
@echo ' regtest-global[.#] - Regtest-build all global samples'
|
||||||
|
|
||||||
|
help-distrib::
|
||||||
|
@echo ' wiki-samples - Print a DokuWiki table of samples'
|
||||||
|
|
||||||
$(patsubst %,show-%,$(CT_SAMPLES)):
|
$(patsubst %,show-%,$(CT_SAMPLES)):
|
||||||
@$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@))
|
@$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@))
|
||||||
|
|
||||||
@ -84,3 +87,6 @@ $(patsubst %,regtest_%,$(CT_SAMPLES)):
|
|||||||
|
|
||||||
saveconfig:
|
saveconfig:
|
||||||
@$(CT_LIB_DIR)/scripts/saveSample.sh
|
@$(CT_LIB_DIR)/scripts/saveSample.sh
|
||||||
|
|
||||||
|
wiki-samples:
|
||||||
|
@$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
# Parses all samples on the command line, and for each of them, prints
|
# Parses all samples on the command line, and for each of them, prints
|
||||||
# the versions of the main tools
|
# the versions of the main tools
|
||||||
|
|
||||||
opt="$1"
|
[ "$1" = "-v" ] && opt="$1" && shift
|
||||||
[ "${opt}" = "-v" ] && shift || opt=
|
[ "$1" = "-w" ] && opt="$1" && shift
|
||||||
|
|
||||||
# GREP_OPTIONS screws things up.
|
# GREP_OPTIONS screws things up.
|
||||||
export GREP_OPTIONS=
|
export GREP_OPTIONS=
|
||||||
@ -13,6 +13,7 @@ export GREP_OPTIONS=
|
|||||||
dump_single_sample() {
|
dump_single_sample() {
|
||||||
local verbose=0
|
local verbose=0
|
||||||
[ "$1" = "-v" ] && verbose=1 && shift
|
[ "$1" = "-v" ] && verbose=1 && shift
|
||||||
|
[ "$1" = "-w" ] && wiki=1 && shift
|
||||||
local width="$1"
|
local width="$1"
|
||||||
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
|
||||||
@ -22,11 +23,12 @@ dump_single_sample() {
|
|||||||
sample_top="${CT_LIB_DIR}"
|
sample_top="${CT_LIB_DIR}"
|
||||||
sample_type="global"
|
sample_type="global"
|
||||||
fi
|
fi
|
||||||
|
. "${sample_top}/samples/${sample}/crosstool.config"
|
||||||
|
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 ",broken"
|
||||||
echo ")"
|
echo ")"
|
||||||
if [ ${verbose} -ne 0 ]; then
|
if [ ${verbose} -ne 0 ]; then
|
||||||
. "${sample_top}/samples/${sample}/crosstool.config"
|
|
||||||
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
|
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
|
||||||
echo " binutils : binutils-${CT_BINUTILS_VERSION}"
|
echo " binutils : binutils-${CT_BINUTILS_VERSION}"
|
||||||
echo -n " C compiler: ${CT_CC}-${CT_CC_VERSION} (C"
|
echo -n " C compiler: ${CT_CC}-${CT_CC_VERSION} (C"
|
||||||
@ -49,6 +51,25 @@ dump_single_sample() {
|
|||||||
[ "${CT_STRACE}" ] && echo -n " strace-${CT_STRACE_VERSION}"
|
[ "${CT_STRACE}" ] && echo -n " strace-${CT_STRACE_VERSION}"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo -n "| ''${sample}'' "
|
||||||
|
echo -n "| ${CT_CC_VERSION} "
|
||||||
|
echo -n "| ''${CT_LIBC}'' "
|
||||||
|
echo -n "| ${CT_LIBC_VERSION} "
|
||||||
|
echo -n "| ${CT_BINUTILS_VERSION} "
|
||||||
|
echo -n "| ${CT_KERNEL_VERSION} "
|
||||||
|
echo -n "| ${CT_ARCH_FLOAT_HW:+hard}${CT_ARCH_FLOAT_SW:+soft} float "
|
||||||
|
echo -n "| ${CT_THREADS_NPTL:+NPTL}${CT_THREADS_LINUXTHREADS:+linuxthreads}${CT_THREADS_NONE:+none} "
|
||||||
|
echo -n "| "
|
||||||
|
if [ -f "${sample_top}/samples/${sample}/reported.by" ]; then
|
||||||
|
( . "${sample_top}/samples/${sample}/reported.by"; \
|
||||||
|
echo -n "| [[${reporter_url}|${reporter_name}]] "
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo -n "| [[http://ymorin.is-a-geek.org/|YEM]] "
|
||||||
|
fi
|
||||||
|
echo "|"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get largest sample width
|
# Get largest sample width
|
||||||
@ -57,6 +78,10 @@ for sample in "${@}"; do
|
|||||||
[ ${#sample} -gt ${width} ] && width=${#sample}
|
[ ${#sample} -gt ${width} ] && width=${#sample}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "${opt}" = -w ]; then
|
||||||
|
echo "^ $(date +%Y%m%d.%H%M) ||||||||||"
|
||||||
|
echo "^ Target ^ gcc version ^ libc ^ libc version ^ binutils version ^ kernel headers ^ float support ^ threading model ^ Misc ^ Reported by ^"
|
||||||
|
fi
|
||||||
for sample in "${@}"; do
|
for sample in "${@}"; do
|
||||||
( dump_single_sample ${opt} ${width} "${sample}" )
|
( dump_single_sample ${opt} ${width} "${sample}" )
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user