summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2019-06-19 15:36:18 +0200
committerDaiki Ueno <ueno@gnu.org>2019-06-19 15:59:01 +0200
commit787888e181543f5a85eb69d6a3caf14f9a4262b2 (patch)
tree2ac047e3a54957fec125d32d8f6f0e542ecf8084
parenteb5eb7aea7fc41a2c15d853cd57c7c030644f4ee (diff)
build: Declare dependency chain between static libs in commonp11p
In common/ there are sub-libraries namely libp11-common.a, libp11-library.a, libp11-tool.a, and libp11-test.a. All the latter 3 libs use the symbols from libp11-common.a, it would make sense to declare a dependency against it.
-rw-r--r--common/meson.build17
-rw-r--r--p11-kit/meson.build22
-rw-r--r--trust/meson.build10
3 files changed, 19 insertions, 30 deletions
diff --git a/common/meson.build b/common/meson.build
index 656592a..2f777a9 100644
--- a/common/meson.build
+++ b/common/meson.build
@@ -29,10 +29,8 @@ libp11_library = static_library('p11-library', 'library.c',
gnu_symbol_visibility: 'hidden',
include_directories: configinc)
-libp11_library_dep = declare_dependency(include_directories: [configinc,
- commoninc],
- link_with: libp11_library,
- dependencies: thread_deps)
+libp11_library_dep = declare_dependency(link_with: libp11_library,
+ dependencies: [libp11_common_dep] + thread_deps)
libp11_test_sources = [
'mock.c',
@@ -41,10 +39,8 @@ libp11_test_sources = [
libp11_test = static_library('p11-test', libp11_test_sources,
include_directories: configinc)
-libp11_test_dep = declare_dependency(include_directories: [configinc,
- commoninc],
- link_with: libp11_test,
- dependencies: thread_deps)
+libp11_test_dep = declare_dependency(link_with: libp11_test,
+ dependencies: [libp11_common_dep] + thread_deps)
libp11_tool_sources = [
'tool.c'
@@ -56,9 +52,8 @@ endif
libp11_tool = static_library('p11-tool', libp11_tool_sources,
include_directories: configinc)
-libp11_tool_dep = declare_dependency(include_directories: [configinc,
- commoninc],
- link_with: libp11_tool)
+libp11_tool_dep = declare_dependency(link_with: libp11_tool,
+ dependencies: [libp11_common_dep])
# Tests ----------------------------------------------------------------
diff --git a/p11-kit/meson.build b/p11-kit/meson.build
index a78cf9e..f410ee7 100644
--- a/p11-kit/meson.build
+++ b/p11-kit/meson.build
@@ -34,8 +34,7 @@ libp11_kit_internal_c_args = [
libp11_kit_internal = static_library('p11-kit-internal',
libp11_kit_internal_sources,
- dependencies: [libp11_common_dep,
- libp11_library_dep] + libffi_deps,
+ dependencies: [libp11_library_dep] + libffi_deps,
c_args: libp11_kit_internal_c_args,
implicit_include_directories: false,
gnu_symbol_visibility: 'hidden')
@@ -117,7 +116,7 @@ libp11_kit_testable = static_library('p11-kit-testable',
libp11_kit_sources,
c_args: libp11_kit_testable_c_args,
implicit_include_directories: false,
- dependencies: [libp11_common_dep, libp11_library_dep] + libffi_deps + dlopen_deps)
+ dependencies: [libp11_library_dep] + libffi_deps + dlopen_deps)
p11_kit_sources = [
'lists.c',
@@ -127,14 +126,14 @@ p11_kit_sources = [
executable('p11-kit',
p11_kit_sources,
c_args: common_c_args,
- dependencies: [libp11_tool_dep, libp11_common_dep] + libffi_deps + dlopen_deps,
+ dependencies: [libp11_tool_dep] + libffi_deps + dlopen_deps,
link_with: libp11_kit,
install: true)
executable('p11-kit-remote',
'remote.c',
c_args: common_c_args,
- dependencies: [libp11_tool_dep, libp11_common_dep] + libffi_deps + dlopen_deps,
+ dependencies: [libp11_tool_dep] + libffi_deps + dlopen_deps,
link_with: libp11_kit,
install: true,
install_dir: prefix / privatedir)
@@ -142,7 +141,7 @@ executable('p11-kit-remote',
executable('p11-kit-remote-testable',
'remote.c',
c_args: common_c_args,
- dependencies: [libp11_tool_dep, libp11_common_dep] + libffi_deps + dlopen_deps,
+ dependencies: [libp11_tool_dep] + libffi_deps + dlopen_deps,
link_with: libp11_kit_testable)
executable('p11-kit-server',
@@ -150,7 +149,7 @@ executable('p11-kit-server',
c_args: common_c_args + [
'-DP11_KIT_REMOTE="p11-kit-remote"'
],
- dependencies: [libp11_tool_dep, libp11_common_dep] + libsystemd_deps + libffi_deps + dlopen_deps,
+ dependencies: [libp11_tool_dep] + libsystemd_deps + libffi_deps + dlopen_deps,
implicit_include_directories: false,
link_with: libp11_kit,
install: true,
@@ -162,7 +161,7 @@ executable('p11-kit-server-testable',
'-DP11_KIT_REMOTE="p11-kit-remote-testable"'
],
implicit_include_directories: false,
- dependencies: [libp11_tool_dep, libp11_common_dep] + libsystemd_deps + libffi_deps + dlopen_deps,
+ dependencies: [libp11_tool_dep] + libsystemd_deps + libffi_deps + dlopen_deps,
link_with: libp11_kit_testable)
# Check if compilation succeeds with CRYPTOKI_GNU=1
@@ -213,7 +212,7 @@ foreach name : p11_kit_tests
t = executable(name, '@0@.c'.format(name),
c_args: tests_c_args + libp11_kit_testable_c_args,
include_directories: [configinc, commoninc],
- dependencies: [libp11_test_dep, libp11_common_dep] + libffi_deps + dlopen_deps,
+ dependencies: [libp11_test_dep] + libffi_deps + dlopen_deps,
link_with: libp11_kit_testable)
test(name, t)
endforeach
@@ -227,7 +226,7 @@ foreach name : p11_kit_progs
t = executable(name, '@0@.c'.format(name),
c_args: tests_c_args,
include_directories: [configinc, commoninc],
- dependencies: [libp11_test_dep, libp11_common_dep] + libffi_deps + dlopen_deps,
+ dependencies: [libp11_test_dep] + libffi_deps + dlopen_deps,
link_with: libp11_kit_testable)
endforeach
@@ -264,8 +263,7 @@ foreach name, sources : mock_sources
shared_module(name,
sources,
name_prefix: '',
- include_directories: [configinc, commoninc],
- dependencies: [libp11_test_dep, libp11_common_dep])
+ dependencies: [libp11_test_dep])
endforeach
p11_kit_pc_variables = [
diff --git a/trust/meson.build b/trust/meson.build
index 70786fa..b6cb260 100644
--- a/trust/meson.build
+++ b/trust/meson.build
@@ -49,8 +49,7 @@ shared_module('p11-kit-trust',
'module-init.c',
name_prefix: '',
c_args: p11_kit_trust_c_args,
- dependencies: [libp11_library_dep,
- libp11_common_dep] + libtasn1_deps,
+ dependencies: [libp11_library_dep] + libtasn1_deps,
link_with: libtrust_data,
install: true,
install_dir: prefix / p11_module_path)
@@ -90,7 +89,6 @@ executable('trust',
c_args: common_c_args,
link_with: libtrust_data,
dependencies: [libp11_kit_dep,
- libp11_common_dep,
libp11_tool_dep] + libffi_deps + dlopen_deps + libtasn1_deps,
install: true)
@@ -133,8 +131,7 @@ foreach name : trust_tests
c_args: common_c_args + tests_c_args + libtrust_testable_c_args,
dependencies: [libp11_kit_dep,
libp11_library_dep,
- libp11_test_dep,
- libp11_common_dep] + dlopen_deps,
+ libp11_test_dep] + dlopen_deps,
link_with: [libtrust_testable, libtrust_data, libtrust_test])
test(name, t)
endforeach
@@ -156,7 +153,6 @@ foreach name : trust_progs
c_args: tests_c_args,
dependencies: [libp11_kit_dep,
libp11_library_dep,
- libp11_test_dep,
- libp11_common_dep] + libffi_deps + dlopen_deps,
+ libp11_test_dep] + libffi_deps + dlopen_deps,
link_with: [libtrust_testable, libtrust_data, libtrust_test])
endforeach