From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5A261DE0 for ; Mon, 28 May 2018 15:20:29 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2018 06:20:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,452,1520924400"; d="scan'208";a="227957118" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.55]) by orsmga005.jf.intel.com with SMTP; 28 May 2018 06:20:25 -0700 Received: by (sSMTP sendmail emulation); Mon, 28 May 2018 14:20:24 +0100 Date: Mon, 28 May 2018 14:20:23 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20180528132023.GB8752@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> <1832507.I1aXYWBlau@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1832507.I1aXYWBlau@xps> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) 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 13:20:29 -0000 On Mon, May 28, 2018 at 12:26:24PM +0200, Thomas Monjalon wrote: > 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 > Yes, exactly. > > > > > > +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. > I would hope that dependency detection should solve that, but since you already have support for that in existing build script via environment vars, I have no objection to leveraging that in the meson scripts. Overall, though, I'd prefer to ensure that the detection works so that everyone only needs one environment setup in order to get all builds working simultaneously. /Bruce