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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 D7AA6C433B4 for ; Tue, 20 Apr 2021 10:23:17 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 599F7611C9 for ; Tue, 20 Apr 2021 10:23:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 599F7611C9 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 [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 812664170C; Tue, 20 Apr 2021 12:22:54 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id A8DC9411A5 for ; Tue, 20 Apr 2021 12:22:47 +0200 (CEST) IronPort-SDR: sorESKXon8oDVGhB66emjZJV9TN5/Wykj2vp/N7+H+/C3l2QdGKz+4JeaGu/qujqfiTyUqX549 eiSifR2MeI/w== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="175588780" X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="175588780" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 03:22:46 -0700 IronPort-SDR: B2LkG800dQ1Xea2QdMI78UB8tPrQmebsGCZhGq5tQgbtBEXezvx1czFoLQaeccMwgDHAddk5aC InzBV3Hcl67A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="616862575" Received: from silpixa00399126.ir.intel.com ([10.237.223.116]) by fmsmga005.fm.intel.com with ESMTP; 20 Apr 2021 03:22:46 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Tue, 20 Apr 2021 11:22:21 +0100 Message-Id: <20210420102232.314452-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210420102232.314452-1-bruce.richardson@intel.com> References: <20210401115009.1063844-1-bruce.richardson@intel.com> <20210420102232.314452-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 05/16] build: reduce indentation in app build spec X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" As with the lib and drivers directories, we can use "continue" keyword to reduce the indentation level of the majority of the foreach block. At the same time, we can also replace tab indentation with spaces. Signed-off-by: Bruce Richardson --- app/meson.build | 101 ++++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/app/meson.build b/app/meson.build index 50a53dbde8..35e53861bb 100644 --- a/app/meson.build +++ b/app/meson.build @@ -2,71 +2,72 @@ # Copyright(c) 2017-2019 Intel Corporation if is_windows - subdir_done() + subdir_done() endif apps = [ - 'pdump', - 'proc-info', - 'test-acl', - 'test-bbdev', - 'test-cmdline', - 'test-compress-perf', - 'test-crypto-perf', - 'test-eventdev', - 'test-fib', - 'test-flow-perf', - 'test-pipeline', - 'test-pmd', - 'test-regex', - 'test-sad'] + 'pdump', + 'proc-info', + 'test-acl', + 'test-bbdev', + 'test-cmdline', + 'test-compress-perf', + 'test-crypto-perf', + 'test-eventdev', + 'test-fib', + 'test-flow-perf', + 'test-pipeline', + 'test-pmd', + 'test-regex', + 'test-sad', +] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API'] default_ldflags = [] if get_option('default_library') == 'static' and not is_windows - default_ldflags += ['-Wl,--export-dynamic'] + default_ldflags += ['-Wl,--export-dynamic'] endif foreach app:apps - build = true - name = app - sources = [] - includes = [] - cflags = default_cflags - ldflags = default_ldflags - objs = [] # other object files to link against, used e.g. for - # instruction-set optimized versions of code + build = true + name = app + sources = [] + includes = [] + cflags = default_cflags + ldflags = default_ldflags + objs = [] # other object files to link against, used e.g. for + # instruction-set optimized versions of code - # use "deps" for internal DPDK dependencies, and "ext_deps" for - # external package/library requirements - ext_deps = [] - deps = [] + # use "deps" for internal DPDK dependencies, and "ext_deps" for + # external package/library requirements + ext_deps = [] + deps = [] - subdir(name) + subdir(name) - if build - dep_objs = [] - foreach d:deps - dep_objs += get_variable(get_option('default_library') - + '_rte_' + d) - endforeach + if not build + continue + endif - link_libs = [] - if get_option('default_library') == 'static' - link_libs = dpdk_static_libraries + dpdk_drivers - endif + dep_objs = [] + foreach d:deps + dep_objs += get_variable(get_option('default_library') + '_rte_' + d) + endforeach - executable('dpdk-' + name, - sources, - c_args: cflags, - link_args: ldflags, - link_whole: link_libs, - dependencies: dep_objs, - include_directories: includes, - install_rpath: join_paths(get_option('prefix'), - driver_install_path), - install: true) - endif + link_libs = [] + if get_option('default_library') == 'static' + link_libs = dpdk_static_libraries + dpdk_drivers + endif + + executable('dpdk-' + name, + sources, + c_args: cflags, + link_args: ldflags, + link_whole: link_libs, + dependencies: dep_objs, + include_directories: includes, + install_rpath: join_paths(get_option('prefix'), driver_install_path), + install: true) endforeach # special case the autotests -- 2.27.0