]> git.droids-corp.org - dpdk.git/commitdiff
eal: simplify meson build of common directory
authorThomas Monjalon <thomas@monjalon.net>
Fri, 27 Mar 2020 01:15:37 +0000 (02:15 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 31 Mar 2020 11:08:55 +0000 (13:08 +0200)
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 <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
lib/librte_eal/common/meson.build
lib/librte_eal/meson.build
lib/librte_eal/windows/eal/meson.build

index 94dfc5fe74d7fa532ffe887d5cd68fc4f992962a..5885441b488cc129688ea524f6e8ba508ede85c2 100644 (file)
@@ -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',
index 0c3d46574e82fe54403158e9534dad7bbb4941d8..1fc532139b16564911ce0270c761186af989dd1e 100644 (file)
@@ -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 <exec-env>/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
index 2a062c365e8ee21356e83c58bcebf847076cb1c0..46ccdb334329bd781de8dde0f0b41830e5f901c8 100644 (file)
@@ -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',