Rework dumping the samples.
/trunk/scripts/showSamples.sh | 1 0 1 0 -
/trunk/samples/samples.mk | 10 7 3 0 +++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
1.1 --- a/samples/samples.mk Mon May 26 20:28:11 2008 +0000
1.2 +++ b/samples/samples.mk Mon May 26 21:49:36 2008 +0000
1.3 @@ -10,7 +10,8 @@
1.4 @echo ' saveconfig - Save current config as a preconfigured target'
1.5
1.6 help-samples::
1.7 - @echo ' show-samples - show a brief overview of each samples listed below:'
1.8 + @echo ' samples - prints the list of all samples (for scripting)'
1.9 + @echo ' show-<sample> - show a brief overview of <sample>'
1.10 @$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES)
1.11
1.12 help-build::
1.13 @@ -18,8 +19,11 @@
1.14 @echo ' regtest-local[.#] - Regtest-build all local samples'
1.15 @echo ' regtest-global[.#] - Regtest-build all global samples'
1.16
1.17 -show-samples:
1.18 - @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(CT_SAMPLES)
1.19 +$(patsubst %,show-%,$(CT_SAMPLES)):
1.20 + @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@))
1.21 +
1.22 +samples:
1.23 + @echo $(CT_SAMPLES) |sed -r -e 's/ /\n/g;' |sort
1.24
1.25 # How we do build one sample
1.26 PHONY += $(CT_SAMPLES)
2.1 --- a/scripts/showSamples.sh Mon May 26 20:28:11 2008 +0000
2.2 +++ b/scripts/showSamples.sh Mon May 26 21:49:36 2008 +0000
2.3 @@ -48,7 +48,6 @@
2.4 [ "${CT_LTRACE}" ] && echo -n " ltrace-${CT_LTRACE_VERSION}"
2.5 [ "${CT_STRACE}" ] && echo -n " strace-${CT_STRACE_VERSION}"
2.6 echo
2.7 - echo
2.8 fi
2.9 }
2.10