Message ID | 1421993948-24785-1-git-send-email-stephen@networkplumber.org (mailing list archive) |
---|---|
State | Rejected, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D5AA25AD4; Fri, 23 Jan 2015 07:19:44 +0100 (CET) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id F17725ACA for <dev@dpdk.org>; Fri, 23 Jan 2015 07:19:41 +0100 (CET) Received: by mail-pd0-f171.google.com with SMTP id fp1so6657011pdb.2 for <dev@dpdk.org>; Thu, 22 Jan 2015 22:19:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ykpx1tKJJok4E2dFxqvxTYu4EC1mJNTnOTZb8BPdx5E=; b=JBHSjAvuTcemc4YyDRDOomTW6cUYUxfhIuaN4NusSby//Ms6hXaWMXA7fk0xKBp2er KT0BU0qtd4jEJV9RrG4yjLn7elGAjKBOBbGiga2CH2zgq2+P/SFXeJ3oyOslgN+kjnpy V/968T2w8Yxj3t2+U6qI8RlHOpDCBWEy7YcHnrH0xyAucWdw2SbcedyMTydHZrDNnIyq 6gXhK2ESwGP+kxLUk6QRM7FldmVC6j85HDdEAMcBoSZKUp3VfEqwdDZ1ta3+Vr0Cnq1c 8dsaituZQASBA/vq2MkVBtxqoLEdhesFkjh9WIB08Vkuj1imUfL0Op0Pn/XQ47qZvfZ8 lmNA== X-Gm-Message-State: ALoCoQmOmtL90Aqkd5u81ZLfWm2mw5JvjA13yPywuwqDmAaGcliON8SCjTW9Cp66OhXuyGpMwmbk X-Received: by 10.68.192.100 with SMTP id hf4mr8895386pbc.54.1421993970330; Thu, 22 Jan 2015 22:19:30 -0800 (PST) Received: from urahara.brocade.com (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id vk4sm669920pbc.74.2015.01.22.22.19.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jan 2015 22:19:29 -0800 (PST) From: stephen@networkplumber.org To: dev@dpdk.org Date: Thu, 22 Jan 2015 22:19:08 -0800 Message-Id: <1421993948-24785-1-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 Cc: Stephen Hemminger <shemming@brocade.com> Subject: [dpdk-dev] [PATCH] mk: allow application to override clean X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Stephen Hemminger
Jan. 23, 2015, 6:19 a.m. UTC
From: Stephen Hemminger <shemming@brocade.com> In some cases application may want to have additional rules for clean. This can be handled by allowing the double colon form of rule. https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html Single colon and double colon rules for same target causes an error. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Comments
> In some cases application may want to have additional rules > for clean. This can be handled by allowing the double colon > form of rule. > > https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html > > Single colon and double colon rules for same target causes > an error. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> I think this need could also be solved by having a pkgconfig-like file and not using this rte.app.mk. Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> Applied, despite wrong formatting of the patch Thanks
Hi Stephen, On 01/23/2015 07:19 AM, stephen@networkplumber.org wrote: > From: Stephen Hemminger <shemming@brocade.com> > > In some cases application may want to have additional rules > for clean. This can be handled by allowing the double colon > form of rule. > > https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html There is already a way to do that in dpdk makefiles: you can add the following code in your application Makefile, before the line that includes $(RTE_SDK)/mk/rte.app.mk: POSTCLEAN += my_clean .PHONY: my_clean my_clean: @echo executed after clean Regards, Olivier
Hi Stephen, 2015-01-28 12:00, Olivier MATZ: > Hi Stephen, > > On 01/23/2015 07:19 AM, stephen@networkplumber.org wrote: > > From: Stephen Hemminger <shemming@brocade.com> > > > > In some cases application may want to have additional rules > > for clean. This can be handled by allowing the double colon > > form of rule. > > > > https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html > > There is already a way to do that in dpdk makefiles: you can add > the following code in your application Makefile, before the line > that includes $(RTE_SDK)/mk/rte.app.mk: > > POSTCLEAN += my_clean > > .PHONY: my_clean > my_clean: > @echo executed after clean Does it fit with your needs? Should we revert your patch? Double-colon rules were avoided in DPDK. "Double-colon rules are somewhat obscure and not often very useful"
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Thursday, January 29, 2015 10:52 AM > To: stephen@networkplumber.org > Cc: dev@dpdk.org; Stephen Hemminger > Subject: Re: [dpdk-dev] [PATCH] mk: allow application to override clean > > Should we revert your patch? Double-colon rules were avoided in DPDK. > "Double-colon rules are somewhat obscure and not often very useful" Hi, Also, it looks like DPDK applications that had a 'make clean' target, like dpdk-pktgen, now need to change it to a double colon target to avoid a make error like this: $ cd pktgen-dpdk/ $ make /tmp/dpdk/mk/rte.app.mk:331: *** target file `clean' has both : and :: entries. Stop. This is complaining that the local pktgen 'clean:' rule conflicts with the DPDK 'clean::' rule. John. --
2015-01-29 22:36, Stephen Hemminger: > On Thu, 29 Jan 2015 02:52:45 -0800 > Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > > > Hi Stephen, > > > > 2015-01-28 12:00, Olivier MATZ: > > > Hi Stephen, > > > > > > On 01/23/2015 07:19 AM, stephen@networkplumber.org wrote: > > > > From: Stephen Hemminger <shemming@brocade.com> > > > > > > > > In some cases application may want to have additional rules > > > > for clean. This can be handled by allowing the double colon > > > > form of rule. > > > > > > > > https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html > > > > > > There is already a way to do that in dpdk makefiles: you can add > > > the following code in your application Makefile, before the line > > > that includes $(RTE_SDK)/mk/rte.app.mk: > > > > > > POSTCLEAN += my_clean > > > > > > .PHONY: my_clean > > > my_clean: > > > @echo executed after clean > > > > Does it fit with your needs? > > Should we revert your patch? Double-colon rules were avoided in DPDK. > > "Double-colon rules are somewhat obscure and not often very useful" > > > > Works for me. So the commit is now reverted: http://dpdk.org/browse/dpdk/commit/?id=785e1a0932b67136
--- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -325,7 +325,7 @@ # Clean all generated files # .PHONY: clean -clean: _postclean +clean:: _postclean $(Q)rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS) .PHONY: doclean --- mk/rte.app.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 40afb2c..9c8b06a 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -325,7 +325,7 @@ $(RTE_OUTPUT)/app/$(APP).map: $(APP) # Clean all generated files # .PHONY: clean -clean: _postclean +clean:: _postclean $(Q)rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS) .PHONY: doclean