From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 4F4873989 for ; Thu, 7 Jul 2016 17:36:40 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id z126so153471295wme.0 for ; Thu, 07 Jul 2016 08:36:40 -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=3OHlTHmqRb1EbxNcV/YY7ecruoQEwc1egCqZ8MfD2RQ=; b=F9FRJCvk23AxVA3FdJrZolKdQlwrTnmIWT2lgaNq9gIv4/+ZiWraL3YZ4OAV5BQK8E YbY1lrDsirv6AOdVqwKq06D1C6lCD6KHelcMnZCeIVEVXoqxXUgOEwZjcO3EfeCoDqhE yuXY8MjcmyHOdquv33vOljitcITBlTjVZRyiz2UV5XIemUfRHXL/3PQOPFhYo5+0KnrQ pxsBofndfbNnnyselUF9toPxA8MRBQrXlRLb6gkPXY02jZdNgAdHS1p+YLxz7hlW97Ff T7XMaImzMMwBlyYsdC2bKjgUAA5nU6WamqJOjwwPOO/QPRP7GUxiUWMjv0wfC/eWzpSf GJBw== 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=3OHlTHmqRb1EbxNcV/YY7ecruoQEwc1egCqZ8MfD2RQ=; b=bmtfk7paKqFZXBbNYzPEj/UJN5lpdAM1AaVgzm/rQZ/btm/GoNk8ZFOmqbAZvjlRNB luSgq4GSiuxez0kCRTUiY4Vvl6ycqJmTqBAX2LBv0pVzPf/TyQ+8XQc2jKv6Z9f3CtcY z+eAWeMxWK0o9yz8wpg6K+7w2Lxg7i+68dG7yH6qwWzEnviSCzBt5eTzXB5WcrwTRkdf hfVR05Ins/nagKBC6IMufdrFTWAMhMwb1kcfT4+e2GTof1LE0A6qHwp50bsvIINVEzUT xInSpQyNGf4rGXaDnnizb8XuW5jGmMbW7XFFgoJlSVZfApqSC+a6QbZg1BE7iHWmBi8J UzRw== X-Gm-Message-State: ALyK8tKh8qg2oDud70rYzOAAMRsa+mDWhJAKTQoZW5/TMQIZfKKnz32D2nKi3j1fbAtrCvYF X-Received: by 10.194.114.42 with SMTP id jd10mr760350wjb.88.1467905800094; Thu, 07 Jul 2016 08:36:40 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id p126sm559331wmp.13.2016.07.07.08.36.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 08:36:39 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org Date: Thu, 7 Jul 2016 17:36:25 +0200 Message-Id: <1467905790-10597-7-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> References: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> Subject: [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 15:36:40 -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 --- 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