From patchwork Thu May 2 16:51:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53230 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 DE04A1B1E9; Thu, 2 May 2019 18:52:10 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A7C5F1B1DD for ; Thu, 2 May 2019 18:52:08 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 09:52:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,422,1549958400"; d="scan'208";a="154194135" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by FMSMGA003.fm.intel.com with ESMTP; 02 May 2019 09:52:05 -0700 From: Bruce Richardson To: thomas@monjalon.net Cc: dev@dpdk.org, bluca@debian.org, Bruce Richardson Date: Thu, 2 May 2019 17:51:52 +0100 Message-Id: <20190502165154.21746-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502165154.21746-1-bruce.richardson@intel.com> References: <20190426165043.17268-1-bruce.richardson@intel.com> <20190502165154.21746-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 2/4] examples: install examples as part of ninja 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" When we install dpdk onto a system, we want to put the examples into the /usr/share/dpdk (or /usr/local/share) directory for reference. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- examples/meson.build | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index e4babf6bf..1a6134f12 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -8,12 +8,20 @@ endif execinfo = cc.find_library('execinfo', required: false) -allow_skips = true # don't flag an error if we can't build an app +all_examples = run_command('sh', '-c', + 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' + ).stdout().split() +# 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').to_lower() == 'all' - dirs = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done') - examples = dirs.stdout().split() + examples = all_examples + allow_skips = true # don't flag an error if we can't build an app else examples = get_option('examples').split(',') allow_skips = false # error out if we can't build a requested app