mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-22 09:40:56 +00:00
samples: fix displaying samples
This commit is contained in:
parent
24711bbfbe
commit
75cb688486
@ -4,7 +4,12 @@
|
|||||||
# Build the list of available samples
|
# Build the list of available samples
|
||||||
CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config))
|
CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config))
|
||||||
CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config)))
|
CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config)))
|
||||||
CT_SAMPLES := $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES))
|
CT_SAMPLES := $(shell echo $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES)) \
|
||||||
|
|sed -r -e 's/ /\n/g;' \
|
||||||
|
|sed -r -e 's/(.*),(.*)/\2,\1/;' \
|
||||||
|
|LC_ALL=C sort \
|
||||||
|
|sed -r -e 's/(.*),(.*)/\2,\1/;' \
|
||||||
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# This part deals with the samples help entries
|
# This part deals with the samples help entries
|
||||||
@ -39,7 +44,7 @@ $(patsubst %,show-%,$(CT_SAMPLES)):
|
|||||||
# print the list of all available samples
|
# print the list of all available samples
|
||||||
PHONY += list-samples
|
PHONY += list-samples
|
||||||
list-samples: FORCE
|
list-samples: FORCE
|
||||||
@echo $(CT_SAMPLES) |$(sed) -r -e 's/ /\n/g;' |sort
|
@echo $(CT_SAMPLES) |$(sed) -r -e 's/ /\n/g;'
|
||||||
|
|
||||||
wiki-samples:
|
wiki-samples:
|
||||||
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
|
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
|
||||||
|
@ -30,7 +30,7 @@ dump_single_sample() {
|
|||||||
. "${sample_top}/samples/${sample}/crosstool.config"
|
. "${sample_top}/samples/${sample}/crosstool.config"
|
||||||
if [ -z "${wiki}" ]; then
|
if [ -z "${wiki}" ]; then
|
||||||
t_width=13
|
t_width=13
|
||||||
printf " %-*s [%s" ${width} "${sample}" "${sample_type}"
|
printf "%-*s [%s" ${width} "${sample}" "${sample_type}"
|
||||||
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " "
|
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " "
|
||||||
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
|
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
|
||||||
echo "]"
|
echo "]"
|
||||||
@ -152,7 +152,7 @@ fi
|
|||||||
|
|
||||||
for sample in "${@}"; do
|
for sample in "${@}"; do
|
||||||
( dump_single_sample ${opt} ${width} "${sample}" )
|
( dump_single_sample ${opt} ${width} "${sample}" )
|
||||||
done |LC_ALL=C sort -k2
|
done
|
||||||
|
|
||||||
if [ "${opt}" = -w ]; then
|
if [ "${opt}" = -w ]; then
|
||||||
printf "^ Total: ${#@} samples || **X**: sample uses features marked as being EXPERIMENTAL.\\\\\\\\ **B**: sample is curently BROKEN. |||||||||||||"
|
printf "^ Total: ${#@} samples || **X**: sample uses features marked as being EXPERIMENTAL.\\\\\\\\ **B**: sample is curently BROKEN. |||||||||||||"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user