From patchwork Thu Mar 7 11:28:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrius Sirvys X-Patchwork-Id: 50913 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFC2F4CA0; Thu, 7 Mar 2019 12:28:29 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6AFF94C95 for ; Thu, 7 Mar 2019 12:28:28 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2019 03:28:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,451,1544515200"; d="scan'208";a="150127058" Received: from silpixa00380299.ir.intel.com ([10.237.223.68]) by fmsmga004.fm.intel.com with ESMTP; 07 Mar 2019 03:28:26 -0800 From: Andrius Sirvys To: bruce.richardson@intel.com Cc: dev@dpdk.org, Andrius Sirvys Date: Thu, 7 Mar 2019 11:28:21 +0000 Message-Id: <1551958101-104223-1-git-send-email-andrius.sirvys@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551952591-102518-1-git-send-email-andrius.sirvys@intel.com> References: <1551952591-102518-1-git-send-email-andrius.sirvys@intel.com> Subject: [dpdk-dev] [PATCH v4] build: move variable definition to top level 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" If for debugging we disable the driver directory in the meson.build file, we get an error because the variable "driver_classes" does not exist. This is because driver_classes is only defined in the drivers/meson.build file. Defining driver_classes in dpdk/meson.build file will make it easier for compiling separate directories. In the process, we rename driver_classes to dpdk_driver_classes for consistency with the other variables. Signed-off-by: Andrius Sirvys Acked-by: Bruce Richardson --- v4: Removed unreleated files that were accidentally included --- drivers/meson.build | 4 ++-- meson.build | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/meson.build b/drivers/meson.build index c3c66bb..ebe1104 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -2,7 +2,7 @@ # Copyright(c) 2017 Intel Corporation # Defines the order in which the drivers are buit. -driver_classes = ['common', +dpdk_driver_classes = ['common', 'bus', 'mempool', # depends on common and bus. 'net', # depends on common, bus and mempool. @@ -20,7 +20,7 @@ endif # specify -D_GNU_SOURCE unconditionally default_cflags += '-D_GNU_SOURCE' -foreach class:driver_classes +foreach class:dpdk_driver_classes drivers = [] std_deps = [] config_flag_fmt = '' # format string used to set the value in dpdk_conf diff --git a/meson.build b/meson.build index 7f5e867..7785251 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,7 @@ cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] dpdk_app_link_libraries = [] @@ -110,7 +111,7 @@ message(output_message + '\n') # track driver lists easily if meson.version().version_compare('>=0.47') output_message = '\n===============\nDrivers Enabled\n===============\n' - foreach class:driver_classes + foreach class:dpdk_driver_classes class_drivers = get_variable(class + '_drivers') output_message += '\n' + class + ':\n\t' output_count = 0