From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 4D84321D for ; Fri, 17 May 2013 11:03:33 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.11]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1UdGaT-00051N-Ue for dev@dpdk.org; Fri, 17 May 2013 11:04:33 +0200 Message-ID: <5195F309.1080101@6wind.com> Date: Fri, 17 May 2013 11:06:17 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: dev@dpdk.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 3/3] mk: rule help X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 May 2013 09:03:33 -0000 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 $* >