From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C7FA8A0C41; Fri, 16 Apr 2021 19:05:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95115161A3B; Fri, 16 Apr 2021 19:05:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 71C241619E9 for ; Fri, 16 Apr 2021 19:05:11 +0200 (CEST) IronPort-SDR: PI7U8CWDBcevPvjQkBirqTarjyFOOpTTiLLTxe9kJbVHtldVENU/jPTlxpxZ6mZjju1MdxzzXa P6sM6EJTbJPA== X-IronPort-AV: E=McAfee;i="6200,9189,9956"; a="280388225" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="280388225" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 10:05:11 -0700 IronPort-SDR: FDBbFIQ86stZfpL6es7rpuqbQybhGUNLjYTwDX6PIWY4VlbsbDm/Bd+3B9Eg5Lx1GmLJCogHwB 0zx0hjSjxtkA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="384375813" Received: from silpixa00399126.ir.intel.com ([10.237.223.116]) by orsmga006.jf.intel.com with ESMTP; 16 Apr 2021 10:05:10 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 16 Apr 2021 18:04:49 +0100 Message-Id: <20210416170458.50188-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210416170458.50188-1-bruce.richardson@intel.com> References: <20210401115009.1063844-1-bruce.richardson@intel.com> <20210416170458.50188-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 05/14] 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 50a53dbde..35e53861b 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