From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 1F41028FD for ; Wed, 25 May 2016 19:08:21 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id n129so192855801wmn.1 for ; Wed, 25 May 2016 10:08:21 -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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=8NuuDTcJueuFM3AlDCQ8L9W7jeZZRT3slRwHSV0N1qg=; b=I3UuHxG/6YNy8WNsd7X0GH/1PolPJQ0HqgnmkXB17ri0HSdIHI2eRLE0waMYPzl6jT 4oTt3qj9Kaf8b4glO8rw3zc5calrLQIXYflQaJ/ESm6DDqI+/sBX08LJ9ePfH1acOTQ4 rzUlgLSGLVTVenmJ7yGSWtjBGs46fQ4W9TM/Pv/HlTRyBOpmZIiU9y0VIkEmNa6qvVke GaKLHSixVCRbLAVj8OTZmRDa9fL91uTpz0LBfI4+ipAW4nsGy52vu4juwoDouBLWk5ri vVUWzxQh9nAAhLG0wHoyBIT+/mLB0/uX8Y2I+x48xhFiIMQrVgBQItPd66OI/0nI5l+P cWcA== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=8NuuDTcJueuFM3AlDCQ8L9W7jeZZRT3slRwHSV0N1qg=; b=lh2yMPSjK3IdbZVQm/wxu287kiWIJ9G2cHraDn57DFdZ1QpvxHGXOT1IZb5U88YCms Lj4Zo6JjcqjNmo77u6RQtQvG2O5/6PzOsR2tAU2fZnhHT6lNLxs9qlS25ahO1VYTQmsF 3W353M80e1TZhnyo5onuVx77TH9YEMxZEP017jBrZoWBgCkqWR93ml1l2dMxqDDpVYC3 K+UOBHucLu5tJ6n8VAwJ799bLlaaa6Nd1vHu8wg/j0W1i/ofFrpM1EsuCLDVNjmwjVZW w30T1IhnB9srImayZ12we4qpStkzoyR6Re+jGcOJ97U+vqhfJyrNOt5NqF+sC2O/uEgC b9Yw== X-Gm-Message-State: ALyK8tJfcELWe63jOYFVIhKlqk2YlbTb+1/WXWiXUxQMOxscO/DoCvKcQWT8KkVkB/YYulQQ X-Received: by 10.28.211.213 with SMTP id k204mr4598404wmg.35.1464196100870; Wed, 25 May 2016 10:08:20 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id gk6sm9838393wjc.31.2016.05.25.10.08.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 10:08:20 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org, Bruce Richardson , Stephen Hemminger , Panu Matilainen Date: Wed, 25 May 2016 19:08:19 +0200 Message-ID: <1591100.WzDkHNrJoU@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1464118912-19658-5-git-send-email-nhorman@tuxdriver.com> References: <1463431287-4551-1-git-send-email-nhorman@tuxdriver.com> <1464118912-19658-1-git-send-email-nhorman@tuxdriver.com> <1464118912-19658-5-git-send-email-nhorman@tuxdriver.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCHv4 4/5] Makefile: Do post processing on objects that register a driver 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: Wed, 25 May 2016 17:08:21 -0000 2016-05-24 15:41, Neil Horman: > --- a/mk/internal/rte.compile-pre.mk > +++ b/mk/internal/rte.compile-pre.mk > @@ -80,7 +80,8 @@ C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight > C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," HOSTCC $(@)") > else > C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \ > - $(CFLAGS_$(@)) $(EXTRA_CFLAGS) -o $@ -c $< > + $(CFLAGS_$(@)) $(EXTRA_CFLAGS) -o $@ -c $< > + whitespace change? > C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight > C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," CC $(@)") > endif > @@ -88,10 +89,26 @@ 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 \ It is preferred to keep "then" at the end of the previous line. > + echo MODGEN $@; \ > + OBJF=`readlink -f $@`; \ > + ${RTE_OUTPUT}/buildtools/pmdinfogen \$$OBJF \$$OBJF.mod.c; \ Maybe .pmd.c would be more appropriate than .mod.c? What means mod/MODGEN/MODBUILD? > + if [ \$$? -eq 0 ]; \ > + then \ > + echo MODBUILD $@; \ > + $(CC) -c -o \$$OBJF.mod.o \$$OBJF.mod.c; \ > + $(CROSS)ld -r -o \$$OBJF.o \$$OBJF.mod.o \$$OBJF; \ > + mv -f \$$OBJF.o \$$OBJF; \ > + fi; \ > + fi; \ > + true" && \ Why "true"? It deserves to be in a shell script, at least to ease testing.