From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 3/3] mk: rule help Date: Fri, 17 May 2013 11:06:17 +0200 Message-ID: <5195F309.1080101@6wind.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 > --- > 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 $* >