From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4AC93A04DD; Thu, 22 Oct 2020 17:00:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54894AA29; Thu, 22 Oct 2020 17:00:07 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 66CC6AA08 for ; Thu, 22 Oct 2020 17:00:02 +0200 (CEST) IronPort-SDR: PtDzyQ9kVD4ygwFBAJQz5k1SEk8aMmg5nXnt7gPB+2nk6D08f3KsPYg/1N40Wix4hWN421+NHH R+FYRcP4Z6Fw== X-IronPort-AV: E=McAfee;i="6000,8403,9781"; a="185218998" X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="185218998" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2020 08:00:00 -0700 IronPort-SDR: pIaAW9qHFPmyz/1rpfihPmr/siBO62huRzSovccjIoRwarP61Cfza6uvDqLFSkDm2qqh0pP4ih moMiYPqCHxMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="533997488" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga005.jf.intel.com with ESMTP; 22 Oct 2020 07:59:59 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Thu, 22 Oct 2020 15:59:43 +0100 Message-Id: <20201022145944.470054-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201022145944.470054-1-bruce.richardson@intel.com> References: <20201022145944.470054-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC PATCH 2/3] build: shorten top-level build file 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move some basic configuration settings out of the top-level meson.build file to the "config/meson.build" file, so as to keep the top-level file as clear and as short as possible. Signed-off-by: Bruce Richardson --- config/meson.build | 18 ++++++++++++++++++ meson.build | 17 ----------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/config/meson.build b/config/meson.build index 258b01d06..10643fdeb 100644 --- a/config/meson.build +++ b/config/meson.build @@ -14,6 +14,24 @@ foreach env:supported_exec_envs set_variable('is_' + env, exec_env == env) endforeach +# set the basic ISA +if host_machine.cpu_family().startswith('x86') + arch_subdir = 'x86' +elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch') + arch_subdir = 'arm' +elif host_machine.cpu_family().startswith('ppc') + arch_subdir = 'ppc' +endif + +# configure the build, and make sure configs here and in root folder are +# able to be included in any file. We also store a global array of include dirs +# for passing to pmdinfogen scripts +global_inc = include_directories('.', '..', + '../lib/librte_eal/include', + '../lib/librte_eal/@0@/include'.format(host_machine.system()), + '../lib/librte_eal/@0@/include'.format(arch_subdir), +) + # MS linker requires special treatment. # TODO: use cc.get_linker_id() with Meson >= 0.54 is_ms_linker = is_windows and (cc.get_id() == 'clang') diff --git a/meson.build b/meson.build index ab950a2ce..8333d264f 100644 --- a/meson.build +++ b/meson.build @@ -28,23 +28,6 @@ dpdk_libs_disabled = [] dpdk_drvs_disabled = [] abi_version_file = files('ABI_VERSION') -if host_machine.cpu_family().startswith('x86') - arch_subdir = 'x86' -elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch') - arch_subdir = 'arm' -elif host_machine.cpu_family().startswith('ppc') - arch_subdir = 'ppc' -endif - -# configure the build, and make sure configs here and in config folder are -# able to be included in any file. We also store a global array of include dirs -# for passing to pmdinfogen scripts -global_inc = include_directories('.', 'config', - 'lib/librte_eal/include', - 'lib/librte_eal/@0@/include'.format(host_machine.system()), - 'lib/librte_eal/@0@/include'.format(arch_subdir), -) - # do main build config subdir('config') -- 2.25.1