# HG changeset patch # User "Yann E. MORIN" # Date 1211838576 0 # Node ID c538627f69f1d2d63481bf70580538506d536c9a # Parent 2d3057a4b2c995d0f3a4ddbc10ec11896b5f9ac2 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(-) diff -r 2d3057a4b2c9 -r c538627f69f1 samples/samples.mk --- a/samples/samples.mk Mon May 26 20:28:11 2008 +0000 +++ b/samples/samples.mk Mon May 26 21:49:36 2008 +0000 @@ -10,7 +10,8 @@ @echo ' saveconfig - Save current config as a preconfigured target' help-samples:: - @echo ' show-samples - show a brief overview of each samples listed below:' + @echo ' samples - prints the list of all samples (for scripting)' + @echo ' show- - show a brief overview of ' @$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES) help-build:: @@ -18,8 +19,11 @@ @echo ' regtest-local[.#] - Regtest-build all local samples' @echo ' regtest-global[.#] - Regtest-build all global samples' -show-samples: - @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(CT_SAMPLES) +$(patsubst %,show-%,$(CT_SAMPLES)): + @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@)) + +samples: + @echo $(CT_SAMPLES) |sed -r -e 's/ /\n/g;' |sort # How we do build one sample PHONY += $(CT_SAMPLES) diff -r 2d3057a4b2c9 -r c538627f69f1 scripts/showSamples.sh --- a/scripts/showSamples.sh Mon May 26 20:28:11 2008 +0000 +++ b/scripts/showSamples.sh Mon May 26 21:49:36 2008 +0000 @@ -48,7 +48,6 @@ [ "${CT_LTRACE}" ] && echo -n " ltrace-${CT_LTRACE_VERSION}" [ "${CT_STRACE}" ] && echo -n " strace-${CT_STRACE_VERSION}" echo - echo fi }