From: Thomas Monjalon Date: Tue, 7 May 2013 13:43:57 +0000 (+0200) Subject: mk: add rule to list configs X-Git-Tag: spdx-start~10983 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a8f1e3d4ad53d58e250cf9e77af5e3c746c4de4f;p=dpdk.git 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 Reviewed-by: Olivier Matz --- diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 68bf547f26..3d05ba525b 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 e2fb91ff5a..fa094968ce 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