From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 2619D95C8 for ; Fri, 8 Jul 2016 16:42:34 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id f126so14675052wma.1 for ; Fri, 08 Jul 2016 07:42:34 -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=vDuR7fhuTDEyRAo9J0ATmFW9MSYNEVZhdl9Zf43SJ/c2S4sDzScjOioRQfPruJcr3F zTKGQOdhKlyur4nJdfcEf/10cw4if40ujUI9Wzg9O/9Pc2sCCyO4/WAm6/KDn2GRvaaH jJyI1VFTIHC6MaLr3gbbfyHRjNE321DTkYVQCsycLx4zuGAKpI6x1/cf5GjO7QBkWaoq +Lqu6JHH/0ta9TdEMiMjtzHw1ApCkZhsfVjB0c2wXEp/3kjHgYM9ndlxYXmQd+dTRbDV VpTiZ7nt3qtE/POr/JbwZCaG8Cw1WlEkgTBEBgAzLj3J81kocIuKPRIwysI6cSs4SDkW FXnA== 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=FmwdMU2JO7J4uiBqWkSTptuCMjnbVLcJl1BB31CzXr3fk3XO8qlmUrODQG15k2O+4m 33eTg+FLVPXKsZHW389+8/4ag232XhXqryPSK057IIHlyvLw8K3Sw2x+dfJ1hNLYc3ut q1dl+zy9233lK/+JgQI+9ndkaeGnDzwm3Hezba3x1YQPI/hm1GjlCk9x/3lpBES0q4Nu ZQxJcSt/3SNjbH/is+l3p17QRkqHUZZGKrPI0rStA4fEmwB4PUVJqZRdBq00BVePKboS VLA2KYimqMk2oQX9A1VvK729Hz6cSaTg7eOsFvfLzHJkODqOgSniej4UPDCjkfO3r5Vf gQ4A== X-Gm-Message-State: ALyK8tIL0ej1kiq+TCfuEpOaZ9mRXOFCtfrz/i+zgOfK2viGA1CNIezmn6yB4YBRmtRUle3Y X-Received: by 10.194.5.40 with SMTP id p8mr5790413wjp.56.1467988953948; Fri, 08 Jul 2016 07:42:33 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id qf7sm1713958wjc.41.2016.07.08.07.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jul 2016 07:42:33 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org Date: Fri, 8 Jul 2016 16:42:19 +0200 Message-Id: <1467988944-25004-6-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467988944-25004-1-git-send-email-thomas.monjalon@6wind.com> References: <1467972855-21873-1-git-send-email-thomas.monjalon@6wind.com> <1467988944-25004-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v3 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 14:42:34 -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