From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id CD0C95A56 for ; Fri, 8 Jul 2016 12:14:23 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id n127so9955707wme.1 for ; Fri, 08 Jul 2016 03:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AkPFvEQ73H9x99NdoiJUSzP9rF/WSHIbOx1XI1es7gA=; b=TGMsZgvaZF+KIi2XySp0QQM99lerO9jtzx+3jZne9Mt2KY05OaxbWb/mKscNVJXKqD ydfq77vwBrXNU9Q42TcXjpEvWkxBbQq6Fjcv3gUckEvwHysQ9TqcZYsOGhvzAR0R8lzb 0NL+TTWXgYST+nC4cE2jwa3gL2g447EBNiEVATsBO0oMLExbJF5/Cb502Q4KNC84Raha svjunqdancnhsKnZd1Ok6/rH+q8tWMMeqrKnKai/cJSDDkMOQrO1jtmYQUFlVwihWhg2 P6cIzzuPI5nG+DpRF4kFR11XhcSjHSJyCDM2bZqUB6LaWXh1VVtbQxAQpvQ3bL0cglBJ SHpg== 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:in-reply-to :references; bh=AkPFvEQ73H9x99NdoiJUSzP9rF/WSHIbOx1XI1es7gA=; b=XB+F/VqhyrxXv40Dc4m4uGQJ77reW5U9+9W80uRMrmbPvZuPDJpagxf5aiggmdrg68 dyJBpYdKDNxp6MCM4fF/dgOaZYChzqFb6owLtkUoxUAE9yM3IRxlfE4+Iga6cUbV7YDg bFxNOUMOyT0cVco0omGP/2Ahc6cX7jfV09wQGl4KCnG9sFF1h60652wD15WgN1bwb09h VsV88qqmoqQs63hWiNe315k6MpBGgrcJAGpuof3oX+zTVSiJWG1K5F3aeUtdD1VWq/sv nPoBxHpcu90iiSK/L/uKQ5denPR3BjR5UeQe0RgJC+DR4QlmLgss0l/a8NYRZBJQpW2p /DAg== X-Gm-Message-State: ALyK8tLzcpFIOlGiMMQOXRPbtEjs8IzC1FtNZZqUHYXWdgkJU+BsScXxjtNVqAA9NDvkhaoB X-Received: by 10.28.22.144 with SMTP id 138mr2690852wmw.77.1467972863637; Fri, 08 Jul 2016 03:14:23 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id d4sm8146wjb.47.2016.07.08.03.14.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jul 2016 03:14:23 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org Date: Fri, 8 Jul 2016 12:14:10 +0200 Message-Id: <1467972855-21873-6-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467972855-21873-1-git-send-email-thomas.monjalon@6wind.com> References: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> <1467972855-21873-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2 05/10] 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: Fri, 08 Jul 2016 10:14:24 -0000 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 Acked-by: Neil Horman --- 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