1
0
mirror of https://github.com/systemd/systemd synced 2025-10-05 16:03:15 +02:00
Files
systemd/src/journal/meson.build
Zbigniew Jędrzejewski-Szmek 7d247d3cb8 meson: drop explicit custom_target names
[1] says:
> Since 0.60.0 the name argument is optional and defaults to the basename of
> the first output
We specify >= 0.62 as the supported version, so drop the duplicate name in all cases
where it is the same as outputs[0], i.e. almost all cases.

[1] https://mesonbuild.com/Reference-manual_functions.html#custom_target
2025-06-28 17:14:50 +02:00

174 lines
5.5 KiB
Meson

# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_journald_sources = files(
'journald.c',
)
systemd_journald_extract_sources = files(
'journald-audit.c',
'journald-client.c',
'journald-console.c',
'journald-context.c',
'journald-kmsg.c',
'journald-manager.c',
'journald-native.c',
'journald-rate-limit.c',
'journald-socket.c',
'journald-stream.c',
'journald-sync.c',
'journald-syslog.c',
'journald-varlink.c',
'journald-wall.c',
# Build fuzz-journald.c as part of systemd-journald so we only compile it once instead of once per
# fuzz test.
'fuzz-journald.c',
)
journald_gperf_c = custom_target(
input : 'journald-gperf.gperf',
output : 'journald-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
generated_sources += journald_gperf_c
systemd_journald_extract_sources += journald_gperf_c
journalctl_sources = files(
'journalctl.c',
'journalctl-authenticate.c',
'journalctl-catalog.c',
'journalctl-filter.c',
'journalctl-misc.c',
'journalctl-show.c',
'journalctl-util.c',
'journalctl-varlink.c',
)
if get_option('link-journalctl-shared')
journalctl_link_with = [libshared]
else
journalctl_link_with = [
libshared_static,
libsystemd_static,
]
endif
journal_test_template = test_template + {
'objects' : ['systemd-journald'],
}
journal_fuzz_template = fuzz_template + {
'objects' : ['systemd-journald'],
'dependencies' : libselinux,
}
executables += [
libexec_template + {
'name' : 'systemd-journald',
'sources' : systemd_journald_sources + systemd_journald_extract_sources,
'include_directories' : [libexec_template['include_directories'], include_directories('.')],
'extract' : systemd_journald_extract_sources,
'dependencies' : [
liblz4_cflags,
libselinux,
libxz_cflags,
libzstd_cflags,
threads,
],
},
libexec_template + {
'name' : 'systemd-bsod',
'public' : true,
'conditions' : ['HAVE_QRENCODE'],
'sources' : files('bsod.c'),
'dependencies' : libqrencode,
},
executable_template + {
'name' : 'systemd-cat',
'public' : true,
'sources' : files('cat.c'),
'objects' : ['systemd-journald'],
'dependencies' : [libselinux, threads],
},
executable_template + {
'name' : 'journalctl',
'public' : true,
'sources' : journalctl_sources,
'link_with' : journalctl_link_with,
'dependencies' : [
libdl,
liblz4_cflags,
libxz_cflags,
libzstd_cflags,
threads,
],
},
journal_test_template + {
'sources' : files('test-journald-config.c'),
'dependencies' : [
liblz4_cflags,
libselinux,
libxz_cflags,
],
},
journal_test_template + {
'sources' : files('test-journald-rate-limit.c'),
'dependencies' : [
liblz4_cflags,
libselinux,
libxz_cflags,
],
},
journal_test_template + {
'sources' : files('test-journald-syslog.c'),
'dependencies' : [
liblz4_cflags,
libselinux,
libxz_cflags,
threads,
],
},
journal_test_template + {
'sources' : files('test-journald-tables.c'),
'dependencies' : [
libselinux,
],
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-audit.c'),
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-kmsg.c'),
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-native.c'),
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-native-fd.c'),
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-stream.c'),
},
journal_fuzz_template + {
'sources' : files('fuzz-journald-syslog.c'),
},
]
if install_sysconfdir_samples
install_data('journald.conf',
install_dir : pkgconfigfiledir)
endif
if get_option('create-log-dirs')
install_emptydir('/var/log/journal',
install_mode : 'rwxr-xr-x')
if get_option('adm-group')
meson.add_install_script(
sh, '-c',
'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
endif
if get_option('wheel-group')
meson.add_install_script(
sh, '-c',
'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
endif
endif