[dpdk-dev] [PATCH 3/3] mk: rule help

Olivier MATZ olivier.matz at 6wind.com
Fri May 17 11:06:17 CEST 2013


Thomas,

I think the "maketxt" macro is overkill... why not just a "cat" ?

Olivier

On 05/07/2013 05:17 PM, Thomas Monjalon wrote:
> The goal of this rule is to show which rules/options are available from a
> "make" command.
> Let's start by printing short doc about SDK building.
> 
> The macro maketxt allow to interpret syntax "# make foo" while keeping
> indentation of the source document.
> Here, it is used to call "make showconfigs" to list available targets.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
> ---
>  mk/rte.sdkdoc.mk  |    8 ++++++++
>  mk/rte.sdkroot.mk |    3 ++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk
> index edae1e7..6850c39 100644
> --- a/mk/rte.sdkdoc.mk
> +++ b/mk/rte.sdkdoc.mk
> @@ -38,6 +38,14 @@ $(error "Cannot use T= with doc target")
>  endif
>  endif
>  
> +define maketxt
> +	sed 's,^\([[:space:]]*\)# make \(.*\),make -rRs \2 | sed "s/^/\1/",e' $1
> +endef
> +
> +.PHONY: help
> +help:
> +	@$(call maketxt, $(RTE_SDK)/doc/build-sdk-quick.txt)
> +
>  .PHONY: all
>  all: htmlapi
>  
> diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
> index 6bbbd54..905b678 100644
> --- a/mk/rte.sdkroot.mk
> +++ b/mk/rte.sdkroot.mk
> @@ -103,8 +103,9 @@ testall testimport:
>  install uninstall:
>  	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
>  
> -.PHONY: doc
> +.PHONY: doc help
>  doc: doc-all
> +help: doc-help
>  doc-%:
>  	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkdoc.mk $*
>  



More information about the dev mailing list