All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 3/3] mk: rule help
Date: Fri, 17 May 2013 11:06:17 +0200	[thread overview]
Message-ID: <5195F309.1080101@6wind.com> (raw)
In-Reply-To: <f54b18b23b958789d69e7d5d1376cec813093f9d.1367939814.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> ---
>  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 $*
>  

  parent reply	other threads:[~2013-05-17  9:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 15:17 [PATCH 0/3] make help Thomas Monjalon
     [not found] ` <cover.1367939814.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-07 15:17   ` [PATCH 1/3] mk: rule showconfigs for configs listing Thomas Monjalon
     [not found]     ` <43533094849ffdacde83cad14c59364caa39d595.1367939814.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17  9:05       ` Olivier MATZ
     [not found]         ` <5195F2F2.60107-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17 14:53           ` Thomas Monjalon
2013-05-07 15:17   ` [PATCH 2/3] doc: how to build Thomas Monjalon
     [not found]     ` <fa5bbf77e53cbef7f33b49b1e8b01e960d0ce4c1.1367939814.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17  9:06       ` Olivier MATZ
     [not found]         ` <5195F303.2080004-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17 15:20           ` Thomas Monjalon
2013-05-07 15:17   ` [PATCH 3/3] mk: rule help Thomas Monjalon
     [not found]     ` <f54b18b23b958789d69e7d5d1376cec813093f9d.1367939814.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17  9:06       ` Olivier MATZ [this message]
     [not found]         ` <5195F309.1080101-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-17 15:27           ` Thomas Monjalon
2013-05-28 22:15   ` [PATCH v2 0/3] make help Thomas Monjalon
     [not found]     ` <cover.1369779070.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-28 22:15       ` [PATCH v2 1/3] doc: how to build Thomas Monjalon
2013-05-28 22:15       ` [PATCH v2 2/3] mk: rule showconfigs for configs listing Thomas Monjalon
2013-05-28 22:15       ` [PATCH v2 3/3] mk: rule help Thomas Monjalon
2013-05-30 14:55       ` [PATCH v2 0/3] make help Olivier MATZ
     [not found]         ` <51A76848.6010902-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-05-30 22:02           ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5195F309.1080101@6wind.com \
    --to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.