From 8a07253fa076dcfff1738600743d5c3b4d4f4131 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 13 Nov 2015 18:50:52 -0800 Subject: Use $* to simplify rules in samples.mk. Signed-off-by: Alexey Neyman diff --git a/samples/samples.mk b/samples/samples.mk index 2d9a287..d76a93f 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -46,11 +46,11 @@ show-config: .config # Prints the details of a sample PHONY += $(patsubst %,show-%,$(CT_SAMPLES)) -$(patsubst %,show-%,$(CT_SAMPLES)): config_files +$(patsubst %,show-%,$(CT_SAMPLES)): show-%: config_files @KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst show-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@)) + @$(CT_LIB_DIR)/scripts/showSamples.sh -v $* @rm -f .config.sample # Prints the details of all samples @@ -70,11 +70,11 @@ list-samples-pre: FORCE @echo 'Status Sample name' PHONY += $(patsubst %,list-%,$(CT_SAMPLES)) -$(patsubst %,list-%,$(CT_SAMPLES)): config_files +$(patsubst %,list-%,$(CT_SAMPLES)): list-%: config_files @KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst list-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh $(patsubst list-%,%,$(@)) + @$(CT_LIB_DIR)/scripts/showSamples.sh $* @rm -f .config.sample PHONY += list-samples-short @@ -117,11 +117,11 @@ wiki-samples-pre: FORCE wiki-samples-post: FORCE $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES) -$(patsubst %,wiki-%,$(CT_SAMPLES)): config_files +$(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%: config_files $(SILENT)KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst wiki-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(patsubst wiki-%,%,$(@)) + $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $* $(SILENT)rm -f .config.sample # ---------------------------------------------------------- -- cgit v0.10.2-6-g49f6