examples: reduce indentation in build files

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 <bruce.richardson@intel.com>
This commit is contained in:
Bruce Richardson 2021-04-20 11:22:22 +01:00 committed by Thomas Monjalon
parent 23bd8128d6
commit cf59165dcb
54 changed files with 283 additions and 234 deletions

View File

@ -9,5 +9,5 @@
deps += 'bbdev'
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -9,5 +9,5 @@
deps += 'net_bond'
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -8,5 +8,7 @@
allow_experimental_apis = true
sources = files(
'commands.c', 'main.c', 'parse_obj_list.c'
'commands.c',
'main.c',
'parse_obj_list.c',
)

View File

@ -15,5 +15,5 @@ endif
allow_experimental_apis = true
deps += ['distributor', 'power']
sources = files(
'main.c'
'main.c',
)

View File

@ -11,9 +11,11 @@ if not build
subdir_done()
endif
sources = files('lib/rte_ethtool.c',
sources = files(
'lib/rte_ethtool.c',
'ethtool-app/ethapp.c',
'ethtool-app/main.c')
'ethtool-app/main.c',
)
includes = include_directories('lib', 'ethtool-app')
deps += 'bus_pci'

View File

@ -11,5 +11,5 @@ deps += 'eventdev'
sources = files(
'main.c',
'pipeline_worker_generic.c',
'pipeline_worker_tx.c'
'pipeline_worker_tx.c',
)

View File

@ -19,5 +19,5 @@ sources = files(
'fips_validation_sha.c',
'fips_validation_xts.c',
'fips_dev_self_test.c',
'main.c'
'main.c',
)

View File

@ -9,5 +9,5 @@
deps += 'flow_classify'
allow_experimental_apis = true
sources = files(
'flow_classify.c'
'flow_classify.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -15,5 +15,5 @@ endif
deps += ['raw_ioat']
sources = files(
'ioatfwd.c'
'ioatfwd.c',
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += ['ip_frag', 'lpm']
sources = files(
'main.c'
'main.c',
)

View File

@ -17,6 +17,7 @@ sources = files(
'action.c',
'cli.c',
'conn.c',
'cryptodev.c',
'kni.c',
'link.c',
'main.c',
@ -27,5 +28,4 @@ sources = files(
'tap.c',
'thread.c',
'tmgr.c',
'cryptodev.c'
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += ['lpm', 'ip_frag']
sources = files(
'main.c'
'main.c',
)

View File

@ -21,5 +21,5 @@ sources = files(
'sa.c',
'sad.c',
'sp4.c',
'sp6.c'
'sp6.c',
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += 'hash'
sources = files(
'main.c'
'main.c',
)

View File

@ -14,6 +14,6 @@ endif
deps += ['kni', 'bus_pci']
sources = files(
'main.c'
'main.c',
)
allow_experimental_apis = true

View File

@ -16,5 +16,6 @@ ext_deps += pqos
allow_experimental_apis = true
cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
sources = files(
'cat.c', 'l2fwd-cat.c'
'cat.c',
'l2fwd-cat.c',
)

View File

@ -12,5 +12,5 @@ if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
endif
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -11,9 +11,9 @@ allow_experimental_apis = true
deps += 'eventdev'
sources = files(
'main.c',
'l2fwd_poll.c',
'l2fwd_common.c',
'l2fwd_event.c',
'l2fwd_event_generic.c',
'l2fwd_event_internal_port.c',
'l2fwd_event_generic.c'
'l2fwd_poll.c',
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += ['jobstats', 'timer']
sources = files(
'main.c'
'main.c',
)

View File

@ -16,5 +16,6 @@ endif
ext_deps += librt
deps += 'timer'
sources = files(
'main.c', 'shm.c'
'main.c',
'shm.c',
)

View File

@ -9,5 +9,5 @@
# Enable experimental API flag as l2fwd uses rte_ethdev_set_ptype API
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += ['acl', 'lpm', 'hash']
sources = files(
'main.c'
'main.c',
)

View File

@ -8,6 +8,6 @@
deps += ['graph', 'eal', 'lpm', 'ethdev', 'node' ]
sources = files(
'main.c'
'main.c',
)
allow_experimental_apis = true

View File

@ -14,5 +14,6 @@ endif
allow_experimental_apis = true
deps += ['power', 'timer', 'lpm', 'hash', 'metrics', 'telemetry']
sources = files(
'main.c', 'perf_core.c'
'main.c',
'perf_core.c',
)

View File

@ -9,6 +9,11 @@
allow_experimental_apis = true
deps += ['hash', 'lpm', 'fib', 'eventdev']
sources = files(
'l3fwd_em.c', 'l3fwd_lpm.c', 'l3fwd_fib.c', 'l3fwd_event.c',
'l3fwd_event_internal_port.c', 'l3fwd_event_generic.c', 'main.c'
'l3fwd_em.c',
'l3fwd_event.c',
'l3fwd_event_internal_port.c',
'l3fwd_event_generic.c',
'l3fwd_fib.c',
'l3fwd_lpm.c',
'main.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -8,42 +8,61 @@ endif
# list of all example apps. Keep 1-3 per line, in alphabetical order.
all_examples = [
'bbdev_app', 'bond',
'bbdev_app',
'bond',
'cmdline',
'distributor', 'ethtool',
'distributor',
'ethtool',
'eventdev_pipeline',
'fips_validation', 'flow_classify',
'flow_filtering', 'helloworld',
'fips_validation',
'flow_classify',
'flow_filtering',
'helloworld',
'ioat',
'ip_fragmentation', 'ip_pipeline',
'ip_reassembly', 'ipsec-secgw',
'ipv4_multicast', 'kni',
'l2fwd', 'l2fwd-cat', 'l2fwd-event',
'l2fwd-crypto', 'l2fwd-jobstats',
'l2fwd-keepalive', 'l3fwd',
'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph',
'ip_fragmentation',
'ip_pipeline',
'ip_reassembly',
'ipsec-secgw',
'ipv4_multicast',
'kni',
'l2fwd',
'l2fwd-cat',
'l2fwd-crypto',
'l2fwd-event',
'l2fwd-jobstats',
'l2fwd-keepalive',
'l3fwd',
'l3fwd-acl',
'l3fwd-graph',
'l3fwd-power',
'link_status_interrupt',
'multi_process/client_server_mp/mp_client',
'multi_process/client_server_mp/mp_server',
'multi_process/hotplug_mp',
'multi_process/simple_mp',
'multi_process/symmetric_mp',
'ntb', 'packet_ordering',
'ntb',
'packet_ordering',
'performance-thread/l3fwd-thread',
'performance-thread/pthread_shim',
'pipeline',
'ptpclient',
'qos_meter', 'qos_sched',
'qos_meter',
'qos_sched',
'rxtx_callbacks',
'server_node_efd/node',
'server_node_efd/server',
'service_cores',
'skeleton',
'timer', 'vdpa',
'vhost', 'vhost_crypto',
'vhost_blk', 'vm_power_manager',
'timer',
'vdpa',
'vhost',
'vhost_blk',
'vhost_crypto',
'vm_power_manager',
'vm_power_manager/guest_cli',
'vmdq', 'vmdq_dcb',
'vmdq',
'vmdq_dcb',
]
# on install, skip copying all meson.build files
@ -85,7 +104,14 @@ foreach example: examples
deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
subdir(example)
if build
if not build
if not allow_skips
error('Cannot build requested example "' + name + '"')
endif
message('Skipping example "' + name + '"')
continue
endif
dep_objs = ext_deps
foreach d:deps
var_name = get_option('default_library') + '_rte_' + d
@ -103,9 +129,4 @@ foreach example: examples
link_args: ldflags,
c_args: cflags,
dependencies: dep_objs)
elif not allow_skips
error('Cannot build requested example "' + name + '"')
else
message('Skipping example "' + name + '"')
endif
endforeach

View File

@ -15,7 +15,7 @@ endif
deps += 'rawdev'
cflags += ['-D_FILE_OFFSET_BITS=64']
sources = files(
'ntb_fwd.c'
'ntb_fwd.c',
)
if dpdk_conf.has('RTE_RAW_NTB')
deps += 'raw_ntb'

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += 'reorder'
sources = files(
'main.c'
'main.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'ptpclient.c'
'ptpclient.c',
)

View File

@ -9,5 +9,6 @@
allow_experimental_apis = true
deps += 'meter'
sources = files(
'main.c', 'rte_policer.c'
'main.c',
'rte_policer.c',
)

View File

@ -9,6 +9,11 @@
allow_experimental_apis = true
deps += ['sched', 'cfgfile']
sources = files(
'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
'init.c', 'main.c', 'stats.c'
'app_thread.c',
'args.c',
'cfg_file.c',
'cmdline.c',
'init.c',
'main.c',
'stats.c',
)

View File

@ -10,5 +10,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'basicfwd.c'
'basicfwd.c',
)

View File

@ -9,5 +9,5 @@
allow_experimental_apis = true
deps += 'timer'
sources = files(
'main.c'
'main.c',
)

View File

@ -14,5 +14,5 @@ endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -14,7 +14,8 @@ endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(
'main.c', 'virtio_net.c'
'main.c',
'virtio_net.c',
)
if dpdk_conf.has('RTE_RAW_IOAT')

View File

@ -19,5 +19,7 @@ endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(
'blk.c', 'vhost_blk.c', 'vhost_blk_compat.c'
'blk.c',
'vhost_blk.c',
'vhost_blk_compat.c',
)

View File

@ -14,5 +14,5 @@ endif
allow_experimental_apis = true
deps += ['vhost', 'cryptodev']
sources = files(
'main.c'
'main.c',
)

View File

@ -14,7 +14,9 @@ endif
deps += ['power']
sources = files(
'main.c', 'parse.c', 'vm_power_cli_guest.c'
'main.c',
'parse.c',
'vm_power_cli_guest.c',
)
allow_experimental_apis = true

View File

@ -27,7 +27,12 @@ endif
allow_experimental_apis = true
sources = files(
'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
'channel_manager.c',
'channel_monitor.c',
'main.c',
'parse.c',
'power_manager.c',
'vm_power_cli.c',
)
# If we're on X86, pull in the x86 code for the branch monitor algo.

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)

View File

@ -8,5 +8,5 @@
allow_experimental_apis = true
sources = files(
'main.c'
'main.c',
)