shared: rename "libnm-systemd-logging-stub.la" to "libnm-log-null.la"

This is really just a different implementation of
"nm-glib-aux/nm-logging-fwd.h", that parallels libnm-log-core.

It's also not only useful to shared/systemd, but also share/nm-platform,
which also requires linking with a logging backend.
This commit is contained in:
Thomas Haller 2021-02-18 07:57:46 +01:00
parent 074c83d483
commit b55710d6a6
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728
9 changed files with 38 additions and 34 deletions

View File

@ -519,6 +519,25 @@ shared_nm_log_core_libnm_log_core_la_LIBADD = \
$(SYSTEMD_JOURNAL_LIBS) \
$(NULL)
noinst_LTLIBRARIES += shared/nm-log-null/libnm-log-null.la
shared_nm_log_null_libnm_log_null_la_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
$(CODE_COVERAGE_CFLAGS) \
$(SANITIZER_LIB_CFLAGS) \
$(GLIB_CFLAGS) \
$(NULL)
shared_nm_log_null_libnm_log_null_la_SOURCES = \
shared/nm-log-null/nm-logging-null.c \
$(NULL)
shared_nm_log_null_libnm_log_null_la_LIBADD = \
$(GLIB_LIBS) \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL)
###############################################################################
noinst_LTLIBRARIES += shared/nm-platform/libnm-platform.la
@ -718,7 +737,7 @@ shared_nm_glib_aux_tests_test_shared_general_LDFLAGS = \
shared_nm_glib_aux_tests_test_shared_general_LDADD = \
shared/nm-glib-aux/libnm-glib-aux.la \
shared/systemd/libnm-systemd-logging-stub.la \
shared/nm-log-null/libnm-log-null.la \
shared/nm-std-aux/libnm-std-aux.la \
shared/libcsiphash.la \
$(GLIB_LIBS) \
@ -747,7 +766,7 @@ shared_nm_glib_aux_tests_test_json_aux_LDFLAGS = \
shared_nm_glib_aux_tests_test_json_aux_LDADD = \
$(JANSSON_LIBS) \
shared/nm-glib-aux/libnm-glib-aux.la \
shared/systemd/libnm-systemd-logging-stub.la \
shared/nm-log-null/libnm-log-null.la \
shared/nm-std-aux/libnm-std-aux.la \
shared/libcsiphash.la \
$(GLIB_LIBS) \
@ -1362,7 +1381,7 @@ src_libnm_core_impl_tests_ldadd = \
src/libnm-core-aux-intern/libnm-core-aux-intern.la \
shared/nm-base/libnm-base.la \
shared/systemd/libnm-systemd-shared.la \
shared/systemd/libnm-systemd-logging-stub.la \
shared/nm-log-null/libnm-log-null.la \
shared/nm-glib-aux/libnm-glib-aux.la \
shared/nm-std-aux/libnm-std-aux.la \
shared/libcsiphash.la \
@ -1592,7 +1611,7 @@ libnm_libnm_static_la_LIBADD = \
introspection/libnmdbus.la \
shared/nm-glib-aux/libnm-glib-aux.la \
shared/systemd/libnm-systemd-shared.la \
shared/systemd/libnm-systemd-logging-stub.la \
shared/nm-log-null/libnm-log-null.la \
shared/nm-udev-aux/libnm-udev-aux.la \
shared/nm-std-aux/libnm-std-aux.la \
shared/libcsiphash.la \
@ -1939,21 +1958,6 @@ libsystemd_cppflags = \
$(CODE_COVERAGE_CFLAGS) \
$(NULL)
noinst_LTLIBRARIES += shared/systemd/libnm-systemd-logging-stub.la
shared_systemd_libnm_systemd_logging_stub_la_CPPFLAGS = \
$(libsystemd_cppflags) \
$(NULL)
shared_systemd_libnm_systemd_logging_stub_la_SOURCES = \
shared/systemd/nm-logging-stub.c \
$(NULL)
shared_systemd_libnm_systemd_logging_stub_la_LIBADD = \
$(GLIB_LIBS) \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL)
noinst_LTLIBRARIES += shared/systemd/libnm-systemd-shared.la
shared_systemd_libnm_systemd_shared_la_CPPFLAGS = \

View File

@ -58,7 +58,7 @@ executable(
libnm_glib_aux_dep_link,
libcurl_dep,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,

View File

@ -28,7 +28,7 @@ exe = executable(
libnm_nm_default_dep,
libnm_glib_aux_dep_link,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
)
test(

View File

@ -56,7 +56,7 @@ executable(
libnm_base_dep_link,
libnm_glib_aux_dep_link,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,

View File

@ -147,7 +147,7 @@ libnm_static = static_library(
libnm_udev_aux_dep,
libudev_dep,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
)
linker_script = join_paths(meson.current_source_dir(), 'libnm.ver')
@ -160,7 +160,7 @@ libnm = shared_library(
libnm_static,
libnm_core_impl,
libnmdbus,
libnm_systemd_logging_stub,
libnm_log_null,
libnm_glib_aux,
libnm_base,
],

View File

@ -196,6 +196,12 @@ libnm_log_core_dep = declare_dependency(
link_with: libnm_log_core,
)
libnm_log_null = static_library(
'nm-log-null',
sources: 'nm-log-null/nm-logging-null.c',
dependencies: glib_nm_default_dep,
)
libnm_platform = static_library(
'nm-platform',
sources: [
@ -276,12 +282,6 @@ libnm_systemd_shared_dep = declare_dependency(
link_with: libnm_systemd_shared,
)
libnm_systemd_logging_stub = static_library(
'nm-systemd-logging-stub',
sources: 'systemd/nm-logging-stub.c',
dependencies: glib_nm_default_dep,
)
if enable_tests
subdir('nm-glib-aux/tests')
subdir('nm-platform/tests')

View File

@ -4,7 +4,7 @@ exe = executable(
'test-shared-general',
'test-shared-general.c',
dependencies: libnm_glib_aux_dep_link,
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
)
test(
@ -23,7 +23,7 @@ if jansson_dep.found()
jansson_dep,
dl_dep,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
)
test(

View File

@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
#include "shared/systemd/nm-default-systemd-shared.h"
#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-glib-aux/nm-logging-fwd.h"

View File

@ -30,7 +30,7 @@ foreach test_unit: test_units
libnm_core_impl_dep_link,
libnm_base_dep_link,
],
link_with: libnm_systemd_logging_stub,
link_with: libnm_log_null,
)
test(