logging: move logging into its own subdir
Some stuff we build (the DHCP manager) gets built independently so that we can use it for unit tests. For that, we need to build the logging bits separately too, since the independent DHCP library can't use them if they are embedded in NM.
This commit is contained in:
@@ -440,6 +440,7 @@ include/Makefile
|
||||
src/Makefile
|
||||
src/tests/Makefile
|
||||
marshallers/Makefile
|
||||
src/logging/Makefile
|
||||
src/named-manager/Makefile
|
||||
src/vpn-manager/Makefile
|
||||
src/dhcp-manager/Makefile
|
||||
|
@@ -1,4 +1,5 @@
|
||||
SUBDIRS= \
|
||||
logging \
|
||||
named-manager \
|
||||
vpn-manager \
|
||||
dhcp-manager \
|
||||
@@ -16,6 +17,7 @@ SUBDIRS= \
|
||||
INCLUDES = -I${top_srcdir} \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_builddir}/marshallers \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_srcdir}/src/named-manager \
|
||||
-I${top_srcdir}/src/vpn-manager \
|
||||
-I${top_srcdir}/src/dhcp-manager \
|
||||
@@ -125,8 +127,6 @@ NetworkManager_SOURCES = \
|
||||
NetworkManagerUtils.h \
|
||||
nm-system.c \
|
||||
nm-system.h \
|
||||
nm-logging.c \
|
||||
nm-logging.h \
|
||||
nm-manager.c \
|
||||
nm-manager.h \
|
||||
nm-netlink-monitor.c \
|
||||
@@ -224,6 +224,7 @@ NetworkManager_CPPFLAGS = \
|
||||
|
||||
NetworkManager_LDADD = \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
./logging/libnm-logging.la \
|
||||
./named-manager/libnamed-manager.la \
|
||||
./vpn-manager/libvpn-manager.la \
|
||||
./dhcp-manager/libdhcp-manager.la \
|
||||
|
@@ -3,6 +3,7 @@ INCLUDES = \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_builddir}/marshallers \
|
||||
-I$(top_srcdir)/src/nm-bluez-manager
|
||||
|
||||
@@ -30,6 +31,7 @@ libbluez_manager_la_CPPFLAGS = \
|
||||
|
||||
libbluez_manager_la_LIBADD = \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(DBUS_LIBS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(BLUEZ_LIBS)
|
||||
|
14
src/logging/Makefile.am
Normal file
14
src/logging/Makefile.am
Normal file
@@ -0,0 +1,14 @@
|
||||
noinst_LTLIBRARIES = libnm-logging.la
|
||||
|
||||
libnm_logging_la_SOURCES = \
|
||||
nm-logging.c \
|
||||
nm-logging.h
|
||||
|
||||
libnm_logging_la_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DLIBEXECDIR=\"$(libexecdir)\" \
|
||||
-DG_DISABLE_DEPRECATED
|
||||
|
||||
libnm_logging_la_LIBADD = \
|
||||
$(GLIB_LIBS)
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "nm-logging.h"
|
||||
#include "nm-utils.h"
|
||||
|
||||
static guint32 log_level = LOGL_INFO;
|
||||
static guint32 log_domains = \
|
@@ -78,6 +78,17 @@ void _nm_log (const char *func, const char *loc,
|
||||
guint32 domain, guint32 level,
|
||||
const char *fmt, ...);
|
||||
|
||||
/* Undefine the nm-utils.h logging stuff to ensure errors */
|
||||
#undef nm_print_backtrace
|
||||
#undef nm_get_timestamp
|
||||
#undef nm_info
|
||||
#undef nm_info_str
|
||||
#undef nm_debug
|
||||
#undef nm_debug_str
|
||||
#undef nm_warning
|
||||
#undef nm_warning_str
|
||||
#undef nm_error
|
||||
#undef nm_error_str
|
||||
|
||||
gboolean nm_logging_setup (const char *level, const char *domains, GError **error);
|
||||
void nm_logging_start (gboolean become_daemon);
|
@@ -1,5 +1,6 @@
|
||||
INCLUDES = \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_builddir}/marshallers
|
||||
@@ -22,6 +23,7 @@ libmodem_manager_la_CPPFLAGS = \
|
||||
|
||||
libmodem_manager_la_LIBADD = \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(DBUS_LIBS)
|
||||
|
||||
nm-serial-device-glue.h: $(top_srcdir)/introspection/nm-device-serial.xml
|
||||
|
@@ -1,4 +1,8 @@
|
||||
INCLUDES = -I${top_srcdir}/libnm-util -I${top_srcdir}/src -I${top_srcdir}/include
|
||||
INCLUDES = \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/include
|
||||
|
||||
noinst_LTLIBRARIES = libnamed-manager.la
|
||||
|
||||
@@ -10,4 +14,8 @@ libnamed_manager_la_CPPFLAGS = \
|
||||
-DNM_PKGDATADIR=\"$(pkgdatadir)\" \
|
||||
-DNM_LOCALSTATEDIR=\"$(localstatedir)\"
|
||||
|
||||
libnamed_manager_la_LIBADD = $(DBUS_LIBS) $(GLIB_LIBS)
|
||||
libnamed_manager_la_LIBADD = \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(DBUS_LIBS) \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
|
@@ -3,6 +3,7 @@ INCLUDES = \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_builddir}/marshallers
|
||||
|
||||
noinst_LTLIBRARIES = libppp-manager.la
|
||||
@@ -28,6 +29,7 @@ libppp_manager_la_CPPFLAGS = \
|
||||
|
||||
libppp_manager_la_LIBADD = \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(DBUS_LIBS) \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
|
@@ -2,6 +2,7 @@ INCLUDES = \
|
||||
-I${top_srcdir} \
|
||||
-I${top_srcdir}/include \
|
||||
-I${top_srcdir}/libnm-util \
|
||||
-I${top_srcdir}/src/logging \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_builddir}/marshallers \
|
||||
-I${top_srcdir}/src/named-manager \
|
||||
@@ -25,6 +26,7 @@ libvpn_manager_la_CPPFLAGS = \
|
||||
|
||||
libvpn_manager_la_LIBADD = \
|
||||
$(top_builddir)/marshallers/libmarshallers.la \
|
||||
$(top_builddir)/src/logging/libnm-logging.la \
|
||||
$(top_builddir)/libnm-util/libnm-util.la \
|
||||
$(DBUS_LIBS) \
|
||||
$(GLIB_LIBS)
|
||||
|
Reference in New Issue
Block a user