summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-05-07 15:43:57 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-01-15 18:08:43 +0100
commite6ae1e2e8ae98ca01500f6b40a9ab9c2306c74d6 (patch)
tree08c87cc8e07fb386ca5fdd18eb25838c160af33f /mk
parent63e3a5a9e0cafe9dc279788fad481ff333c4a389 (diff)
downloaddpdk-e6ae1e2e8ae98ca01500f6b40a9ab9c2306c74d6.zip
dpdk-e6ae1e2e8ae98ca01500f6b40a9ab9c2306c74d6.tar.gz
dpdk-e6ae1e2e8ae98ca01500f6b40a9ab9c2306c74d6.tar.xz
mk: add rule to list configs
Allow to list configs in config/ directory with a simple make rule. The rule showconfigs is reused in config error. In the same time, "echo -n" is replaced by the more portable "printf". Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.sdkconfig.mk12
-rw-r--r--mk/rte.sdkroot.mk4
2 files changed, 9 insertions, 7 deletions
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 7c3e32c..2bce232 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -40,14 +40,16 @@ INSTALL_CONFIGS := $(filter-out %~,\
$(wildcard $(RTE_SRCDIR)/config/defconfig_*)))
INSTALL_TARGETS := $(addsuffix _install,$(INSTALL_CONFIGS))
+.PHONY: showconfigs
+showconfigs:
+ @$(foreach CONFIG, $(INSTALL_CONFIGS), echo $(CONFIG);)
+
.PHONY: config
ifeq ($(RTE_CONFIG_TEMPLATE),)
config:
- @echo -n "No template specified. Use T=template " ; \
- echo "among the following list:" ; \
- for t in $(INSTALL_CONFIGS); do \
- echo " $$t" ; \
- done
+ @printf "No template specified. "
+ @echo "Use T=template among the following list:"
+ @$(MAKE) -rR showconfigs | sed 's,^, ,'
else
config: $(RTE_OUTPUT)/include/rte_config.h $(RTE_OUTPUT)/Makefile
$(Q)$(MAKE) depdirs
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index e6300e2..d1b6087 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -85,8 +85,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
.PHONY: default
default: all
-.PHONY: config showversion
-config showversion:
+.PHONY: config showconfigs showversion
+config showconfigs showversion:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
.PHONY: test fast_test ring_test mempool_test perf_test coverage