1.1 --- a/samples/samples.mk Sun Jan 03 17:36:54 2010 +0100
1.2 +++ b/samples/samples.mk Sun Jan 03 18:33:23 2010 +0100
1.3 @@ -4,7 +4,12 @@
1.4 # Build the list of available samples
1.5 CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config))
1.6 CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config)))
1.7 -CT_SAMPLES := $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES))
1.8 +CT_SAMPLES := $(shell echo $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES)) \
1.9 + |sed -r -e 's/ /\n/g;' \
1.10 + |sed -r -e 's/(.*),(.*)/\2,\1/;' \
1.11 + |LC_ALL=C sort \
1.12 + |sed -r -e 's/(.*),(.*)/\2,\1/;' \
1.13 + )
1.14
1.15 # ----------------------------------------------------------
1.16 # This part deals with the samples help entries
1.17 @@ -39,7 +44,7 @@
1.18 # print the list of all available samples
1.19 PHONY += list-samples
1.20 list-samples: FORCE
1.21 - @echo $(CT_SAMPLES) |$(sed) -r -e 's/ /\n/g;' |sort
1.22 + @echo $(CT_SAMPLES) |$(sed) -r -e 's/ /\n/g;'
1.23
1.24 wiki-samples:
1.25 $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
2.1 --- a/scripts/showSamples.sh Sun Jan 03 17:36:54 2010 +0100
2.2 +++ b/scripts/showSamples.sh Sun Jan 03 18:33:23 2010 +0100
2.3 @@ -30,7 +30,7 @@
2.4 . "${sample_top}/samples/${sample}/crosstool.config"
2.5 if [ -z "${wiki}" ]; then
2.6 t_width=13
2.7 - printf " %-*s [%s" ${width} "${sample}" "${sample_type}"
2.8 + printf "%-*s [%s" ${width} "${sample}" "${sample_type}"
2.9 [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf " "
2.10 [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
2.11 echo "]"
2.12 @@ -152,7 +152,7 @@
2.13
2.14 for sample in "${@}"; do
2.15 ( dump_single_sample ${opt} ${width} "${sample}" )
2.16 -done |LC_ALL=C sort -k2
2.17 +done
2.18
2.19 if [ "${opt}" = -w ]; then
2.20 printf "^ Total: ${#@} samples || **X**: sample uses features marked as being EXPERIMENTAL.\\\\\\\\ **B**: sample is curently BROKEN. |||||||||||||"