From patchwork Tue Apr 20 10:22:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 91848 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A2F9A0548; Tue, 20 Apr 2021 12:23:17 +0200 (CEST) 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 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