meson: move libjournal_core definition to src/journal/meson.build
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Jan 2021 12:16:15 +0000 (21:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 18 Jan 2021 22:06:32 +0000 (07:06 +0900)
meson.build
src/journal/meson.build

index bea4d561557dc3759d095204d7acd57a490623dd..f6ce4df05655121146d6033c57d52aab1703cec1 100644 (file)
@@ -1650,13 +1650,6 @@ subdir('src/shared')
 subdir('src/udev')
 subdir('src/libudev')
 
-libjournal_core = static_library(
-        'journal-core',
-        libjournal_core_sources,
-        journald_gperf_c,
-        include_directories : includes,
-        install : false)
-
 libsystemd_sym_path = '@0@/@1@'.format(project_source_root, libsystemd_sym)
 libsystemd = shared_library(
         'systemd',
index 59da7aa7e0c51b6c15a576c1c9879eb045c64c3c..177eb330476974c3c38820c86ee334115ea9316b 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-libjournal_core_sources = files('''
+sources = files('''
         journald-audit.c
         journald-audit.h
         journald-console.c
@@ -23,17 +23,23 @@ libjournal_core_sources = files('''
         journald-wall.h
 '''.split())
 
-systemd_journald_sources = files('''
-        journald.c
-        journald-server.h
-'''.split())
-
-journald_gperf_c = custom_target(
+sources += custom_target(
         'journald-gperf.c',
         input : 'journald-gperf.gperf',
         output : 'journald-gperf.c',
         command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
 
+libjournal_core = static_library(
+        'journal-core',
+        sources,
+        include_directories : includes,
+        install : false)
+
+systemd_journald_sources = files('''
+        journald.c
+        journald-server.h
+'''.split())
+
 systemd_cat_sources = files('cat.c')
 
 journalctl_sources = files('''