From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id BA693B62 for ; Mon, 28 May 2018 12:26:26 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4DB0A21B36; Mon, 28 May 2018 06:26:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 28 May 2018 06:26:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=bECBDuzup6QqIqooEm4sOueObN ER5Bbf1E6t5EiPdvs=; b=JqBYowJo1ybxGG6jqgC0llBWeIYcUZbPDCeLLKCbB7 CA6cxbUJwHe8AMlHK+b2y15C9CnTWedHCztkQoptnedoS3QkPevFAXDmP4IQfEL5 oNJywML0MzRTBJuer9+nTP0qjbbXpI1zgmTs70iup5d73FDqdHmpHxSqjGQHOMB1 U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=bECBDu zup6QqIqooEm4sOueObNER5Bbf1E6t5EiPdvs=; b=FRItfJXSbLEhJS9U6qp5Bf VS6C7sqwvJtOmwVvd52vCMnpntdtECAA/GM3J/EN2I1AXNefCKR3fppSh4fEeaHa RM8YmRDua3/tFVP+1E4OLNQZb1NeAbJRYJvnfEaQey0sKg6IurrZ/HeGPnZLCH9M CVwmnuS8bomFpR7RKZvicEpa6SqN62YPlZSIHGORwxLLrj4OQy3BwrBM5/6vmzEd MZGMdgMeZwXU092RRlaU3jXna0j3PXk+ok/wTMZp0Z3YncX983ajGn6+9wwclkTh C+z5YHtKDtYCigb/VnFNJAqQbYIyx9TMJNlfcDnypMgMMHrYcrvCdgTK53kw07sw == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id ADBC8E44F3; Mon, 28 May 2018 06:26:25 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org Date: Mon, 28 May 2018 12:26:24 +0200 Message-ID: <1832507.I1aXYWBlau@xps> In-Reply-To: <20180528093317.GB15204@bricha3-MOBL.ger.corp.intel.com> References: <20180424123255.204330-1-bruce.richardson@intel.com> <11072939.itZiRipOQY@xps> <20180528093317.GB15204@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] devtools: add test script for meson builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2018 10:26:27 -0000 28/05/2018 11:33, Bruce Richardson: > On Sat, May 26, 2018 at 11:32:53AM +0200, Thomas Monjalon wrote: > > 25/05/2018 17:18, Bruce Richardson: > > > On Fri, May 25, 2018 at 04:51:58PM +0200, Thomas Monjalon wrote: > > > > +cd $(dirname $(readlink -m $0))/.. > > > > + > > > I don't think we should force the builds to be always put into the base > > > directory. Instead of using cd, I think we should instead capture the base > > > directory path and pass that to meson. > > > > OK to not force the directory. > > You want to build in the current directory? > > If yes, we can just remove this "cd" and no need to pass a base directory > > to meson. > > We would need to pass the base to meson, because otherwise meson assumes > the top-level meson.build file is in the current directory, i.e. calling > "meson build-dir" is the same as "meson . build-dir". If we want to allow > using this script from other places on filesystem, we need to either "cd" > to the base dir as you do now, or else explicitly pass in the basedir. The > latter I think is a better option as it would allow building from any > location on the filesystem. I agree. I don't understand the meson syntax: meson [ options ] [ source directory ] [ build directory ] If there is only one argument, it is the build directory? I could send a v5 to add the source directory in the meson command. It would be: srcdir=$(dirname $(readlink -m $0))/.. $MESON $options $srcdir $builddir > > > > +load_config () > > > > +{ > > > > + reset_env > > > > + . $(dirname $(readlink -e $0))/load-devel-config > > > > + MESON=${MESON:-meson} > > > > +} > > > Why does this need to be done each time? > > > > Because the config could be different for each build (see above). > > > How would it be different, it's the same command called with the same > environment each time? No, the idea is to adapt the environment to the build target. As an example, the dependencies can be different for 32-bit and 64-bit.