From patchwork Thu Nov 12 09:41:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 84050 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8425EA09D3; Thu, 12 Nov 2020 10:42:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7E766CAC; Thu, 12 Nov 2020 10:42:15 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 68EF46CAB; Thu, 12 Nov 2020 10:42:13 +0100 (CET) IronPort-SDR: ixMmjn0U/XorgZ5pqTstT+wcO/ADh1mzCU0izvVdzBCLjD4NfaFxvMp7zectfkEBtmgX2Wyn6W RzeaLD66s2iw== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="231903628" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="231903628" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 01:42:11 -0800 IronPort-SDR: j/7D3l9ikTbrGzPGmcUsYCltY/hFKWvWqZCxA+ujdAAd+mgqrJ0q6zgLTNNHXGuq0LoKTYNY/Y 2YpVqmiOKd7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="339347892" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2020 01:42:10 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson , stable@dpdk.org Date: Thu, 12 Nov 2020 09:41:39 +0000 Message-Id: <20201112094142.1781861-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112094142.1781861-1-bruce.richardson@intel.com> References: <20201110170809.1309043-1-bruce.richardson@intel.com> <20201112094142.1781861-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 1/4] examples: fix flattening directory layout on install 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" By installing the examples one-by-one in a loop in the examples meson.build file we effectively flattened out the structure of the examples folder and omitted some common and shared subfolders that were never directly built. Instead, we can remove the loop and just have the whole "examples" folder installed as-is in a single statement, preserving its directory structure, and thereby fixing the build of a number of the examples. Fixes: 2daf565f91b5 ("examples: install as part of ninja install") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- examples/meson.build | 7 ------- meson.build | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index f17995532..46ec80919 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -47,13 +47,6 @@ all_examples = [ 'vm_power_manager/guest_cli', 'vmdq', 'vmdq_dcb', ] -# install all example code on install - irrespective of whether the example in -# question is to be built as part of this build or not. -foreach ex:all_examples - install_subdir(ex, - install_dir: get_option('datadir') + '/dpdk/examples', - exclude_files: 'meson.build') -endforeach if get_option('examples') == '' subdir_done() diff --git a/meson.build b/meson.build index 61d9a4f5f..45d974cd2 100644 --- a/meson.build +++ b/meson.build @@ -59,6 +59,9 @@ subdir('doc') # build any examples explicitly requested - useful for developers - and # install any example code into the appropriate install path subdir('examples') +install_subdir('examples', + install_dir: get_option('datadir') + '/dpdk', + exclude_files: 'meson.build') # build kernel modules if enabled if get_option('enable_kmods') From patchwork Thu Nov 12 09:41:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 84051 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CC2B8A09D3; Thu, 12 Nov 2020 10:42:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C71A47CAE; Thu, 12 Nov 2020 10:42:22 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D5031592B; Thu, 12 Nov 2020 10:42:19 +0100 (CET) IronPort-SDR: wfEmMvEeu9vQULMZUgowbkIQYrOdvsNDS+0Y31sygCvsk7GduwNVqjlVbUsSUIyXWi1FDIYF8R ACbCEnTxafyw== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="158062221" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="158062221" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 01:42:17 -0800 IronPort-SDR: daSq2moQn1UrhmV6MtUKDsIrEGP2NVK2ISdS4tyH9VX1V4eLewWNUu4DPrIG86oLiVXS8tKwyD SXkSVW9QSlLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="339347913" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2020 01:42:16 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson , stable@dpdk.org Date: Thu, 12 Nov 2020 09:41:40 +0000 Message-Id: <20201112094142.1781861-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112094142.1781861-1-bruce.richardson@intel.com> References: <20201110170809.1309043-1-bruce.richardson@intel.com> <20201112094142.1781861-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 2/4] examples/l2fwd-keepalive: skip build when no librt 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" When librt is not present on a system, processing the meson.build file for this example application causes an error. Make the library non-mandatory and just mark the example as unbuildable if it is not present. Fixes: 89f0711f9ddf ("examples: build some samples with meson") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- examples/l2fwd-keepalive/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build index d678a8ddd..a56d67967 100644 --- a/examples/l2fwd-keepalive/meson.build +++ b/examples/l2fwd-keepalive/meson.build @@ -7,7 +7,13 @@ # DPDK instance, use 'make' allow_experimental_apis = true -ext_deps += cc.find_library('rt') +librt = cc.find_library('rt', required: false) +if not librt.found() + build = false + subdir_done() +endif + +ext_deps += librt deps += 'timer' sources = files( 'main.c', 'shm.c' From patchwork Thu Nov 12 09:41:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 84052 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4A14A09D3; Thu, 12 Nov 2020 10:43:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CCBE272F0; Thu, 12 Nov 2020 10:42:29 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9B5886CAB for ; Thu, 12 Nov 2020 10:42:26 +0100 (CET) IronPort-SDR: 07yl174mK11w5eVpdP95lnLbrXuNwbxYpGmd5XuQbAQ1O8B7u2VSiL1jwj+3iiY5sEAAfN7Awv 20fGmDhn4NIg== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="166776722" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="166776722" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 01:42:24 -0800 IronPort-SDR: z45q56Wlp1YI8nVD0LITlEXKZHvrUm9FE9tKDTWd1OLUfOFcs0e2zYBRiOQvNnTA+PTwNxlJ6F sphnVFUbSJRg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="339347937" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2020 01:42:23 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Date: Thu, 12 Nov 2020 09:41:41 +0000 Message-Id: <20201112094142.1781861-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112094142.1781861-1-bruce.richardson@intel.com> References: <20201110170809.1309043-1-bruce.richardson@intel.com> <20201112094142.1781861-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 3/4] examples: stop processing build file if build is impossible 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" Once it has been determined that an example cannot be built, there is little point in continuing to process the meson.build file for that example, so we can use subdir_done() to return to the calling file. This can potentially prevent problems where later statement in the file may cause an error on systems where the app cannot be built, e.g. on Windows or FreeBSD. Signed-off-by: Bruce Richardson --- examples/distributor/meson.build | 3 +++ examples/ethtool/meson.build | 4 ++++ examples/ioat/meson.build | 3 +++ examples/ip_pipeline/meson.build | 4 ++++ examples/kni/meson.build | 4 ++++ examples/l2fwd-cat/meson.build | 4 ++++ examples/ntb/meson.build | 2 ++ examples/performance-thread/l3fwd-thread/meson.build | 4 ++++ examples/performance-thread/pthread_shim/meson.build | 4 ++++ examples/pipeline/meson.build | 4 ++++ examples/vdpa/meson.build | 2 ++ examples/vhost/meson.build | 2 ++ examples/vhost_blk/meson.build | 2 ++ examples/vhost_crypto/meson.build | 4 ++++ 14 files changed, 46 insertions(+) diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build index 5244cd4ff..d8dbc235f 100644 --- a/examples/distributor/meson.build +++ b/examples/distributor/meson.build @@ -8,6 +8,9 @@ # require the power library build = dpdk_conf.has('RTE_LIB_POWER') +if not build + subdir_done() +endif allow_experimental_apis = true deps += ['distributor', 'power'] diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build index cc8edac3d..4d08bc4c5 100644 --- a/examples/ethtool/meson.build +++ b/examples/ethtool/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = is_linux +if not build + subdir_done() +endif + sources = files('lib/rte_ethtool.c', 'ethtool-app/ethapp.c', 'ethtool-app/main.c') diff --git a/examples/ioat/meson.build b/examples/ioat/meson.build index 6afbaa680..e348196ba 100644 --- a/examples/ioat/meson.build +++ b/examples/ioat/meson.build @@ -8,6 +8,9 @@ allow_experimental_apis = true build = dpdk_conf.has('RTE_RAW_IOAT') +if not build + subdir_done() +endif deps += ['raw_ioat'] diff --git a/examples/ip_pipeline/meson.build b/examples/ip_pipeline/meson.build index 664223c97..945e28b58 100644 --- a/examples/ip_pipeline/meson.build +++ b/examples/ip_pipeline/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = cc.has_header('sys/epoll.h') +if not build + subdir_done() +endif + deps += ['pipeline', 'bus_pci'] allow_experimental_apis = true sources = files( diff --git a/examples/kni/meson.build b/examples/kni/meson.build index 58639b139..e119eebab 100644 --- a/examples/kni/meson.build +++ b/examples/kni/meson.build @@ -8,6 +8,10 @@ # this app can be built if-and-only-if KNI library is buildable build = dpdk_conf.has('RTE_LIB_KNI') +if not build + subdir_done() +endif + deps += ['kni', 'bus_pci'] sources = files( 'main.c' diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build index 2bed18e74..60169bcbd 100644 --- a/examples/l2fwd-cat/meson.build +++ b/examples/l2fwd-cat/meson.build @@ -8,6 +8,10 @@ pqos = cc.find_library('pqos', required: false) build = pqos.found() +if not build + subdir_done() +endif + ext_deps += pqos allow_experimental_apis = true cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local diff --git a/examples/ntb/meson.build b/examples/ntb/meson.build index b0201f68b..02be9fc80 100644 --- a/examples/ntb/meson.build +++ b/examples/ntb/meson.build @@ -9,7 +9,9 @@ allow_experimental_apis = true if not is_linux build = false + subdir_done() endif + deps += 'rawdev' cflags += ['-D_FILE_OFFSET_BITS=64'] sources = files( diff --git a/examples/performance-thread/l3fwd-thread/meson.build b/examples/performance-thread/l3fwd-thread/meson.build index 99de24be7..4858b201e 100644 --- a/examples/performance-thread/l3fwd-thread/meson.build +++ b/examples/performance-thread/l3fwd-thread/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = dpdk_conf.has('RTE_ARCH_X86_64') +if not build + subdir_done() +endif + deps += ['timer', 'lpm'] allow_experimental_apis = true diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build index 26ef78635..d49979930 100644 --- a/examples/performance-thread/pthread_shim/meson.build +++ b/examples/performance-thread/pthread_shim/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64') +if not build + subdir_done() +endif + deps += ['timer'] allow_experimental_apis = true diff --git a/examples/pipeline/meson.build b/examples/pipeline/meson.build index e47d483de..4f5925d7c 100644 --- a/examples/pipeline/meson.build +++ b/examples/pipeline/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = cc.has_header('sys/epoll.h') +if not build + subdir_done() +endif + deps += ['pipeline', 'bus_pci'] allow_experimental_apis = true sources = files( diff --git a/examples/vdpa/meson.build b/examples/vdpa/meson.build index 73f129cd9..26f6089c9 100644 --- a/examples/vdpa/meson.build +++ b/examples/vdpa/meson.build @@ -8,7 +8,9 @@ if not is_linux build = false + subdir_done() endif + deps += 'vhost' allow_experimental_apis = true sources = files( diff --git a/examples/vhost/meson.build b/examples/vhost/meson.build index 24f1f7131..7e5b9d938 100644 --- a/examples/vhost/meson.build +++ b/examples/vhost/meson.build @@ -8,7 +8,9 @@ if not is_linux build = false + subdir_done() endif + deps += 'vhost' allow_experimental_apis = true sources = files( diff --git a/examples/vhost_blk/meson.build b/examples/vhost_blk/meson.build index 857367192..354ba0584 100644 --- a/examples/vhost_blk/meson.build +++ b/examples/vhost_blk/meson.build @@ -8,10 +8,12 @@ if not is_linux build = false + subdir_done() endif if not cc.has_header('linux/virtio_blk.h') build = false + subdir_done() endif deps += 'vhost' diff --git a/examples/vhost_crypto/meson.build b/examples/vhost_crypto/meson.build index b2c125e2f..403f21098 100644 --- a/examples/vhost_crypto/meson.build +++ b/examples/vhost_crypto/meson.build @@ -7,6 +7,10 @@ # DPDK instance, use 'make' build = dpdk_conf.has('RTE_LIB_VHOST') +if not build + subdir_done() +endif + allow_experimental_apis = true deps += ['vhost', 'cryptodev'] sources = files( From patchwork Thu Nov 12 09:41:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 84053 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83B50A09D3; Thu, 12 Nov 2020 10:43:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3435C6883; Thu, 12 Nov 2020 10:42:35 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C10E6AA31 for ; Thu, 12 Nov 2020 10:42:32 +0100 (CET) IronPort-SDR: L6IlPXNEUHjlpegIujdb/7FAgtaZ/xqvOOA9VXS4mKGzaxuoR96+AuiIQryzshmVRCNIBE78YU x+3Uc6o5Ng4A== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="166776738" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="166776738" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 01:42:32 -0800 IronPort-SDR: VHJLCYxWpSO48ORMJXTAVAA1hh0aPpCrA3Mb5chqXnRz4R5s1BlG9kECXgsjCyhmS57T5PLN4x 79nHVfmxhDdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="339347954" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2020 01:42:31 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Date: Thu, 12 Nov 2020 09:41:42 +0000 Message-Id: <20201112094142.1781861-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201112094142.1781861-1-bruce.richardson@intel.com> References: <20201110170809.1309043-1-bruce.richardson@intel.com> <20201112094142.1781861-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 4/4] examples: skip installing unbuildable examples 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" Rather than just installing all examples, we can use the build checks to filter out any examples that are missing dependencies or are otherwise unbuildable on the current system. Signed-off-by: Bruce Richardson --- examples/meson.build | 54 +++++++++++++++++++++++++++----------------- meson.build | 2 ++ 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 46ec80919..9d268c978 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -48,15 +48,11 @@ all_examples = [ 'vmdq', 'vmdq_dcb', ] -if get_option('examples') == '' - subdir_done() -endif - if get_option('examples').to_lower() == 'all' - examples = all_examples + requested_examples = all_examples allow_skips = true # don't flag an error if we can't build an app else - examples = get_option('examples').split(',') + requested_examples = get_option('examples').split(',') allow_skips = false # error out if we can't build a requested app endif default_cflags = machine_args @@ -64,7 +60,9 @@ if cc.has_argument('-Wno-format-truncation') default_cflags += '-Wno-format-truncation' endif -foreach example: examples +# iterate through all examples to see what we need to install +# only actually build requested ones +foreach example: all_examples name = example.split('/')[-1] build = true sources = [] @@ -81,22 +79,36 @@ foreach example: examples foreach d:deps var_name = get_option('default_library') + '_rte_' + d if not is_variable(var_name) - error('Missing dependency "@0@" for example "@1@"'.format(d, name)) + message('Missing dependency "@0@" for example "@1@"'.format(d, name)) + build = false + else + dep_objs += [get_variable(var_name)] endif - dep_objs += [get_variable(var_name)] endforeach - if allow_experimental_apis - cflags += '-DALLOW_EXPERIMENTAL_API' + endif # build + + if not build + # exclude based on top-level directory only + dir = example.split('/')[0] + dpdk_examples_exclude += dir + message('Excluding example directory "@0@" from install'.format(dir)) + endif + + if requested_examples.contains(example) + if build + if allow_experimental_apis + cflags += '-DALLOW_EXPERIMENTAL_API' + endif + executable('dpdk-' + name, sources, + include_directories: includes, + link_whole: link_whole_libs, + link_args: dpdk_extra_ldflags, + c_args: cflags, + dependencies: dep_objs) + elif not allow_skips + error('Cannot build requested example "' + name + '"') + else + message('Skipping example "' + name + '"') endif - executable('dpdk-' + name, sources, - include_directories: includes, - link_whole: link_whole_libs, - link_args: dpdk_extra_ldflags, - c_args: cflags, - dependencies: dep_objs) - elif not allow_skips - error('Cannot build requested example "' + name + '"') - else - message('Skipping example "' + name + '"') endif endforeach diff --git a/meson.build b/meson.build index 45d974cd2..559a9d2f1 100644 --- a/meson.build +++ b/meson.build @@ -58,9 +58,11 @@ subdir('doc') # build any examples explicitly requested - useful for developers - and # install any example code into the appropriate install path +dpdk_examples_exclude = [] subdir('examples') install_subdir('examples', install_dir: get_option('datadir') + '/dpdk', + exclude_directories: dpdk_examples_exclude, exclude_files: 'meson.build') # build kernel modules if enabled