summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-05-07 15:43:57 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-09-17 14:16:11 +0200
commit9aa34c8e155bf38ce715011c88bb9cc97b4367f3 (patch)
tree59372d2c08f7ab81abee32425baba5f2d4141ad3
parent72fae54d9a646d4612f2b9cd1f328c46ced0f599 (diff)
downloaddpdk-9aa34c8e155bf38ce715011c88bb9cc97b4367f3.zip
dpdk-9aa34c8e155bf38ce715011c88bb9cc97b4367f3.tar.gz
dpdk-9aa34c8e155bf38ce715011c88bb9cc97b4367f3.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>
-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 af2b7a6..36b53c4 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -41,14 +41,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 68ae775..44b40dc 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -86,8 +86,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