From: Thomas Monjalon Date: Fri, 27 Mar 2020 01:15:37 +0000 (+0100) Subject: eal: simplify meson build of common directory X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=df3ff6be2b33;p=dpdk.git eal: simplify meson build of common directory The variable common_sources allows to change the list of common files from an arch-specific or OS-specific meson file. For consistency and least surprise principle, this variable is removed. Now the list of common sources is defined only in common/meson.build. As a consequence, the temporary list of files which are currently supported on Windows, is moved from windows/eal/meson.build. Signed-off-by: Thomas Monjalon Acked-by: David Marchand --- diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 94dfc5fe74..5885441b48 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -3,8 +3,21 @@ eal_inc += include_directories('.', 'include') -common_objs = [] -common_sources = files( +if is_windows + sources += files( + 'eal_common_bus.c', + 'eal_common_class.c', + 'eal_common_devargs.c', + 'eal_common_errno.c', + 'eal_common_launch.c', + 'eal_common_lcore.c', + 'eal_common_log.c', + 'eal_common_options.c', + 'eal_common_thread.c', + 'rte_option.c', + ) +else # temporary bad indent +sources += files( 'eal_common_bus.c', 'eal_common_cpuflags.c', 'eal_common_class.c', @@ -37,8 +50,9 @@ common_sources = files( 'rte_option.c', 'rte_random.c', 'rte_reciprocal.c', - 'rte_service.c' + 'rte_service.c', ) +endif common_headers = files( 'include/rte_alarm.h', diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build index 0c3d46574e..1fc532139b 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -5,7 +5,7 @@ # have a straight list of headers and source files. # Initially pull in common settings eal_inc = [global_inc] -subdir('common') # defines common_sources, common_objs, etc. +subdir('common') # Now do OS/exec-env specific settings, including building kernel modules # The /eal/meson.build file should define env_sources, etc. @@ -25,7 +25,7 @@ endif if cc.has_header('getopt.h') cflags += ['-DHAVE_GETOPT_H', '-DHAVE_GETOPT', '-DHAVE_GETOPT_LONG'] endif -sources += common_sources + env_sources -objs = common_objs + env_objs +sources += env_sources +objs = env_objs headers = common_headers + env_headers includes += eal_inc diff --git a/lib/librte_eal/windows/eal/meson.build b/lib/librte_eal/windows/eal/meson.build index 2a062c365e..46ccdb3343 100644 --- a/lib/librte_eal/windows/eal/meson.build +++ b/lib/librte_eal/windows/eal/meson.build @@ -7,18 +7,6 @@ env_objs = [] env_headers = files( 'include/rte_os.h', ) -common_sources = files( - '../../common/eal_common_bus.c', - '../../common/eal_common_class.c', - '../../common/eal_common_devargs.c', - '../../common/eal_common_errno.c', - '../../common/eal_common_launch.c', - '../../common/eal_common_lcore.c', - '../../common/eal_common_log.c', - '../../common/eal_common_options.c', - '../../common/eal_common_thread.c', - '../../common/rte_option.c', -) env_sources = files('eal.c', 'eal_debug.c', 'eal_lcore.c',