From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 87A613978 for ; Thu, 7 Jul 2016 18:04:55 +0200 (CEST) Received: from [2606:a000:111b:40ed:7aac:c0ff:fec2:933b] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1bLBmm-0006ah-8P; Thu, 07 Jul 2016 12:04:34 -0400 Date: Thu, 7 Jul 2016 12:04:14 -0400 From: Neil Horman To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20160707160414.GF26064@hmsreliant.think-freely.org> References: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> <1467905790-10597-7-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467905790-10597-7-git-send-email-thomas.monjalon@6wind.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Score: -1.0 (-) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run 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: Thu, 07 Jul 2016 16:04:55 -0000 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 > --- > 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