mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: don't compile import sources four times
Use a 'convenience library' to do the compilation once and then link the objects into all the files that need it. Those files are small, so this probably doesn't matter too much for speed, but has the advantage that we don't get the same error four times if something goes wrong. The library is conditionalized in the same way importd itself, because we cannot build it without the deps.
This commit is contained in:
parent
af3b864d76
commit
b93f018f57
12
meson.build
12
meson.build
|
@ -2764,7 +2764,8 @@ if conf.get('ENABLE_IMPORTD') == 1
|
|||
'systemd-pull',
|
||||
systemd_pull_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
lib_import_common],
|
||||
dependencies : [versiondep,
|
||||
libcurl,
|
||||
lib_openssl_or_gcrypt,
|
||||
|
@ -2779,7 +2780,8 @@ if conf.get('ENABLE_IMPORTD') == 1
|
|||
'systemd-import',
|
||||
systemd_import_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
lib_import_common],
|
||||
dependencies : [libcurl,
|
||||
libz,
|
||||
libbzip2,
|
||||
|
@ -2792,7 +2794,8 @@ if conf.get('ENABLE_IMPORTD') == 1
|
|||
'systemd-import-fs',
|
||||
systemd_import_fs_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
lib_import_common],
|
||||
install_rpath : rootlibexecdir,
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
@ -2801,7 +2804,8 @@ if conf.get('ENABLE_IMPORTD') == 1
|
|||
'systemd-export',
|
||||
systemd_export_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
link_with : [libshared,
|
||||
lib_import_common],
|
||||
dependencies : [libcurl,
|
||||
libz,
|
||||
libbzip2,
|
||||
|
|
|
@ -1,62 +1,52 @@
|
|||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
systemd_importd_sources = files('''
|
||||
importd.c
|
||||
'''.split())
|
||||
systemd_importd_sources = files(
|
||||
'importd.c')
|
||||
|
||||
systemd_pull_sources = files('''
|
||||
pull.c
|
||||
pull-raw.c
|
||||
pull-raw.h
|
||||
pull-tar.c
|
||||
pull-tar.h
|
||||
pull-job.c
|
||||
pull-job.h
|
||||
pull-common.c
|
||||
pull-common.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
curl-util.c
|
||||
curl-util.h
|
||||
qcow2-util.c
|
||||
qcow2-util.h
|
||||
'''.split())
|
||||
systemd_pull_sources = files(
|
||||
'pull.c',
|
||||
'pull-raw.c',
|
||||
'pull-raw.h',
|
||||
'pull-tar.c',
|
||||
'pull-tar.h',
|
||||
'pull-job.c',
|
||||
'pull-job.h',
|
||||
'pull-common.c',
|
||||
'pull-common.h',
|
||||
'curl-util.c',
|
||||
'curl-util.h')
|
||||
|
||||
systemd_import_sources = files('''
|
||||
import.c
|
||||
import-raw.c
|
||||
import-raw.h
|
||||
import-tar.c
|
||||
import-tar.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
qcow2-util.c
|
||||
qcow2-util.h
|
||||
'''.split())
|
||||
systemd_import_sources = files(
|
||||
'import.c',
|
||||
'import-raw.c',
|
||||
'import-raw.h',
|
||||
'import-tar.c',
|
||||
'import-tar.h')
|
||||
|
||||
systemd_import_fs_sources = files('''
|
||||
import-fs.c
|
||||
import-common.c
|
||||
import-common.h
|
||||
'''.split())
|
||||
systemd_import_fs_sources = files(
|
||||
'import-fs.c')
|
||||
|
||||
systemd_export_sources = files('''
|
||||
export.c
|
||||
export-tar.c
|
||||
export-tar.h
|
||||
export-raw.c
|
||||
export-raw.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
'''.split())
|
||||
systemd_export_sources = files(
|
||||
'export.c',
|
||||
'export-tar.c',
|
||||
'export-tar.h',
|
||||
'export-raw.c',
|
||||
'export-raw.h')
|
||||
|
||||
if conf.get('ENABLE_IMPORTD') == 1
|
||||
lib_import_common = static_library(
|
||||
'import-common',
|
||||
'import-common.c',
|
||||
'import-common.h',
|
||||
'import-compress.c',
|
||||
'import-compress.h',
|
||||
'qcow2-util.c',
|
||||
'qcow2-util.h',
|
||||
include_directories : includes,
|
||||
dependencies : [libbzip2,
|
||||
libxz,
|
||||
libz])
|
||||
|
||||
install_data('org.freedesktop.import1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.import1.service',
|
||||
|
|
Loading…
Reference in a new issue