From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrius Sirvys Subject: [PATCH v3] build: move variable definition to top level Date: Thu, 7 Mar 2019 09:56:31 +0000 Message-ID: <1551952591-102518-1-git-send-email-andrius.sirvys@intel.com> References: <1551803365-79357-1-git-send-email-andrius.sirvys@intel.com> Cc: dev@dpdk.org, Andrius Sirvys To: bruce.richardson@intel.com Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E3D4E2BD5 for ; Thu, 7 Mar 2019 10:56:38 +0100 (CET) In-Reply-To: <1551803365-79357-1-git-send-email-andrius.sirvys@intel.com> 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 --- v3: Updated commit message to more accurately reflect the changes --- drivers/meson.build | 4 ++-- lib/librte_acl/meson.build | 2 +- meson.build | 3 ++- 3 files changed, 5 insertions(+), 4 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/lib/librte_acl/meson.build b/lib/librte_acl/meson.build index aec792f..2207dba 100644 --- a/lib/librte_acl/meson.build +++ b/lib/librte_acl/meson.build @@ -23,7 +23,7 @@ if arch_subdir == 'x86' avx2_tmplib = static_library('avx2_tmp', 'acl_run_avx2.c', dependencies: static_rte_eal, - c_args: '-mavx2') + c_args: cflags + ['-mavx2']) objs += avx2_tmplib.extract_objects('acl_run_avx2.c') cflags += '-DCC_AVX2_SUPPORT' endif 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 -- 2.7.4