From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7995C10F03 for ; Tue, 23 Apr 2019 22:07:09 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 84AA021738 for ; Tue, 23 Apr 2019 22:07:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84AA021738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 165D71B4CD; Wed, 24 Apr 2019 00:06:59 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7C7A81B442 for ; Wed, 24 Apr 2019 00:06:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 15:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,387,1549958400"; d="scan'208";a="133795828" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by orsmga007.jf.intel.com with ESMTP; 23 Apr 2019 15:06:54 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Tue, 23 Apr 2019 23:06:42 +0100 Message-Id: <20190423220644.54589-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423220644.54589-1-bruce.richardson@intel.com> References: <20190423220644.54589-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/4] examples: simplify getting list of all 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" Using find rather than shelling out to a one-liner script is easier to read and understand, as well as allowing shorter lines in the code. Signed-off-by: Bruce Richardson --- examples/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..19f2686b2 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -8,8 +8,9 @@ endif execinfo = cc.find_library('execinfo', required: false) -all_examples = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' +all_examples = run_command('find', meson.current_source_dir(), + '-maxdepth', '1', '-mindepth', '1', + '-type', 'd', '-printf', '%f ' ).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. -- 2.20.1