Merge pull request #28620 from yuwata/meson-use-template-part5

meson: use template to declare executables (part 5)
This commit is contained in:
Daan De Meyer
2023-08-01 18:10:52 +02:00
committed by GitHub
25 changed files with 361 additions and 353 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-ask-password',
'public' : true,
'sources' : files('ask-password.c'),
},
]

View File

@@ -5,6 +5,14 @@ busctl_sources = files(
'busctl.c',
)
executables += [
executable_template + {
'name' : 'busctl',
'public' : true,
'sources' : busctl_sources,
},
]
tests += [
{
'sources' : files(

9
src/cgls/meson.build Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-cgls',
'public' : true,
'sources' : files('cgls.c'),
},
]

9
src/cgtop/meson.build Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-cgtop',
'public' : true,
'sources' : files('cgtop.c'),
},
]

12
src/hwdb/meson.build Normal file
View File

@@ -0,0 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-hwdb',
'public' : true,
'conditions' : ['ENABLE_HWDB'],
'sources' : files('hwdb.c'),
'link_with' : udev_link_with,
'install_rpath' : udev_rpath,
},
]

9
src/initctl/meson.build Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-initctl',
'conditions' : ['HAVE_SYSV_COMPAT'],
'sources' : files('initctl.c'),
},
]

View File

@@ -2,6 +2,15 @@
want_kernel_install = conf.get('ENABLE_KERNEL_INSTALL') == 1
executables += [
executable_template + {
'name' : 'kernel-install',
'public' : true,
'conditions' : ['ENABLE_KERNEL_INSTALL'],
'sources' : files('kernel-install.c'),
},
]
ukify_install = custom_target(
'60-ukify.install',
input : '60-ukify.install.in',
@@ -22,10 +31,9 @@ loaderentry_install = custom_target(
uki_copy_install = files('90-uki-copy.install')
kernel_install_files = [
files('50-depmod.install'),
uki_copy_install,
]
kernel_install_files = uki_copy_install + files(
'50-depmod.install',
)
if want_kernel_install
install_data(kernel_install_files,
@@ -39,6 +47,6 @@ if want_kernel_install
meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir / 'kernel/install.d'))
endif
test_kernel_install_sh = find_program('test-kernel-install.sh')
endif
test_kernel_install_sh = find_program('test-kernel-install.sh')

View File

@@ -0,0 +1,19 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-modules-load',
'conditions' : ['HAVE_KMOD'],
'sources' : files('modules-load.c'),
'dependencies' : libkmod,
},
]
if conf.get('HAVE_KMOD') == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(modulesloaddir))
if install_sysconfdir
meson.add_install_script('sh', '-c',
mkdir_p.format(sysconfdir / 'modules-load.d'))
endif
endif

13
src/mount/meson.build Normal file
View File

@@ -0,0 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-mount',
'public' : true,
'sources' : files('mount-tool.c'),
'dependencies' : libmount,
},
]
meson.add_install_script(meson_make_symlink,
'systemd-mount', bindir / 'systemd-umount')

View File

@@ -150,6 +150,45 @@ libnetworkd_core = static_library(
link_with : networkd_link_with,
build_by_default : false)
executables += [
libexec_template + {
'name' : 'systemd-networkd',
'dbus' : true,
'conditions' : ['ENABLE_NETWORKD'],
'sources' : systemd_networkd_sources,
'include_directories' : network_includes,
'link_with' : [
libnetworkd_core,
libsystemd_network,
networkd_link_with,
],
'dependencies' : threads,
},
libexec_template + {
'name' : 'systemd-networkd-wait-online',
'public' : true,
'conditions' : ['ENABLE_NETWORKD'],
'sources' : systemd_networkd_wait_online_sources,
'link_with' : networkd_link_with,
},
executable_template + {
'name' : 'networkctl',
'public' : true,
'conditions' : ['ENABLE_NETWORKD'],
'sources' : networkctl_sources,
'include_directories' : libsystemd_network_includes,
'link_with' : [
libsystemd_network,
networkd_link_with,
],
},
libexec_template + {
'name' : 'systemd-network-generator',
'sources' : network_generator_sources,
'link_with' : networkd_link_with,
},
]
if conf.get('ENABLE_NETWORKD') == 1
install_data('org.freedesktop.network1.conf',
install_dir : dbuspolicydir)

View File

@@ -35,7 +35,23 @@ libnspawn_core = static_library(
userspace],
build_by_default : false)
systemd_nspawn_sources = files('nspawn.c')
nspawn_libs = [
libnspawn_core,
libshared,
]
executables += [
executable_template + {
'name' : 'systemd-nspawn',
'public' : true,
'sources' : files('nspawn.c'),
'link_with' : nspawn_libs,
'dependencies' : [
libblkid,
libseccomp,
],
},
]
############################################################

View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-quotacheck',
'conditions' : ['ENABLE_QUOTACHECK'],
'sources' : files('quotacheck.c'),
},
]

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-reply-password',
'sources' : files('reply-password.c'),
},
]

9
src/run/meson.build Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-run',
'public' : true,
'sources' : files('run.c'),
},
]

View File

@@ -9,6 +9,27 @@ systemd_shutdown_sources = files(
'umount.c',
)
executables += [
libexec_template + {
'name' : 'systemd-shutdown',
'sources' : systemd_shutdown_sources,
'dependencies' : libmount,
},
libexec_template + {
'name' : 'systemd-shutdown.standalone',
'sources' : systemd_shutdown_sources,
'c_args' : '-DSTANDALONE',
'link_with' : [
libbasic,
libshared_static,
libsystemd_static,
],
'dependencies' : libmount,
'build_by_default' : have_standalone_binaries,
'install' : have_standalone_binaries,
},
]
tests += [
{
'sources' : files(

View File

@@ -0,0 +1,10 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-socket-proxyd',
'public' : true,
'sources' : files('socket-proxyd.c'),
'dependencies' : threads,
},
]

View File

@@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-stdio-bridge',
'public' : true,
'sources' : files('stdio-bridge.c'),
},
]

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
libexec_template + {
'name' : 'systemd-sulogin-shell',
'sources' : files('sulogin-shell.c'),
},
]

25
src/sysusers/meson.build Normal file
View File

@@ -0,0 +1,25 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
executables += [
executable_template + {
'name' : 'systemd-sysusers',
'public' : true,
'conditions' : ['ENABLE_SYSUSERS'],
'sources' : files('sysusers.c'),
},
executable_template + {
'name' : 'systemd-sysusers.standalone',
'public' : have_standalone_binaries,
'conditions' : ['ENABLE_SYSUSERS'],
'sources' : files('sysusers.c'),
'c_args' : '-DSTANDALONE',
'link_with' : [
libbasic,
libbasic_gcrypt,
libshared_static,
libsystemd_static,
],
'build_by_default' : have_standalone_binaries,
'install' : have_standalone_binaries,
},
]

Some files were not shown because too many files have changed in this diff Show More