From: Neil Horman <nhorman@tuxdriver.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run
Date: Thu, 7 Jul 2016 12:04:14 -0400 [thread overview]
Message-ID: <20160707160414.GF26064@hmsreliant.think-freely.org> (raw)
In-Reply-To: <1467905790-10597-7-git-send-email-thomas.monjalon@6wind.com>
On Thu, Jul 07, 2016 at 05:36:25PM +0200, Thomas Monjalon wrote:
> When building with "make V=1" it is expected to see the output of each
> compiler command in order to debug them.
> Unfortunately the pmdinfogen related commands were always quiet.
>
> It is fixed by defining the commands in some Makefile variables.
> They are printed if the verbose mode is enabled.
>
> The other benefit of this rework is to stop compilation after a
> failure with pmdinfogen.
>
> The command readlink is removed in this rework because it seems useless.
>
> Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> mk/internal/rte.compile-pre.mk | 26 ++++++++++++--------------
> 1 file changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
> index 87d2d93..9c25ff6 100644
> --- a/mk/internal/rte.compile-pre.mk
> +++ b/mk/internal/rte.compile-pre.mk
> @@ -84,28 +84,26 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
> C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
> C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," CC $(@)")
> endif
> +PMDINFO_GEN = $(RTE_SDK_BIN)/app/pmdinfogen $@ $@.pmd.c
> +PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
> +PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
> +PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
> + echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \
> + $(PMDINFO_GEN) && \
> + echo "$(if $V,$(PMDINFO_CC), CC $@.pmd.o)" && \
> + $(PMDINFO_CC) && \
> + echo "$(if $V,$(PMDINFO_LD), LD $@)" && \
> + $(PMDINFO_LD) && \
> + mv -f $@.o $@; fi
> C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
> C_TO_O_DO = @set -e; \
> echo $(C_TO_O_DISP); \
> $(C_TO_O) && \
> - sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
> - if [ \$$? -eq 0 ]; then \
> - echo \" PMDINFOGEN\" $@; \
> - OBJF=`readlink -f $@`; \
> - $(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
> - if [ \$$? -eq 0 ]; \
> - then \
> - echo \" PMDINFOBUILD\" $@; \
> - $(CC) $(CFLAGS) -c -o \$$OBJF.pmd.o \$$OBJF.pmd.c; \
> - $(CROSS)ld $(LDFLAGS) -r -o \$$OBJF.o \$$OBJF.pmd.o \$$OBJF; \
> - mv -f \$$OBJF.o \$$OBJF; \
> - fi; \
> - fi;" && \
> + $(PMDINFO_TO_O) && \
> echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \
> sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \
> rm -f $(call obj2dep,$(@)).tmp
>
> -
> # return an empty string if string are equal
> compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
>
> --
> 2.7.0
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
next prev parent reply other threads:[~2016-07-07 16:04 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
2016-07-07 15:50 ` Neil Horman
2016-07-07 16:20 ` Adrien Mazarguil
2016-07-07 15:36 ` [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration Thomas Monjalon
2016-07-07 15:53 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-07 15:56 ` Neil Horman
2016-07-07 16:21 ` Thomas Monjalon
2016-07-07 17:44 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-07 16:02 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 05/11] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-07 15:36 ` [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-07 16:04 ` Neil Horman [this message]
2016-07-07 15:36 ` [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-07 17:55 ` Neil Horman
2016-07-07 21:25 ` Mcnamara, John
2016-07-08 14:51 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message Thomas Monjalon
2016-07-07 16:05 ` Neil Horman
2016-07-07 16:24 ` Thomas Monjalon
2016-07-07 17:46 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
2016-07-07 15:41 ` Thomas Monjalon
2016-07-07 16:11 ` Neil Horman
2016-07-07 16:25 ` Thomas Monjalon
2016-07-08 8:49 ` David Marchand
2016-07-08 13:56 ` Neil Horman
2016-07-08 14:03 ` Thomas Monjalon
2016-07-08 14:13 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-07 15:42 ` Thomas Monjalon
2016-07-07 16:12 ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-07 15:45 ` Thomas Monjalon
2016-07-07 16:14 ` Neil Horman
2016-07-07 16:26 ` Thomas Monjalon
2016-07-07 16:14 ` Neil Horman
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 04/10] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 06/10] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 07/10] pmdinfogen: fix usage message Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 08/10] eal: move PCI table macro Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 10/10] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-08 14:53 ` Neil Horman
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-08 15:23 ` Neil Horman
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message Thomas Monjalon
2016-07-08 15:25 ` Neil Horman
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header Thomas Monjalon
2016-07-08 15:26 ` Neil Horman
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-08 14:42 ` [dpdk-dev] [PATCH v3 10/10] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-08 15:54 ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen 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=20160707160414.GF26064@hmsreliant.think-freely.org \
--to=nhorman@tuxdriver.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).