From c3ba99c2fb06e6ac4e5921f580c26d61afc53917 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 2 Apr 2021 15:29:21 -0400 Subject: [PATCH] Move msgpack to libcommon msgpack provides common utils used across libraries, move it to libcommon. This is part of an effort to standardize our autotools setup across projects to simplify maintenance. Change-Id: Iaf8bb9e4504891f6072e68ac0ea24b8a13503e71 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- .gitignore | 1 - configure.ac | 1 - src/Makefile.am | 1 - src/common/Makefile.am | 9 +++++++++ src/{libmsgpack => common/msgpack}/msgpack.c | 0 src/{libmsgpack => common/msgpack}/msgpack.h | 0 src/liblttng-ust/Makefile.am | 1 - src/liblttng-ust/event-notifier-notification.c | 2 +- src/libmsgpack/Makefile.am | 10 ---------- tests/unit/libmsgpack/Makefile.am | 2 +- tests/unit/libmsgpack/test_msgpack.c | 2 +- 11 files changed, 12 insertions(+), 17 deletions(-) rename src/{libmsgpack => common/msgpack}/msgpack.c (100%) rename src/{libmsgpack => common/msgpack}/msgpack.h (100%) delete mode 100644 src/libmsgpack/Makefile.am diff --git a/.gitignore b/.gitignore index 0e4a2464..bb9079bf 100644 --- a/.gitignore +++ b/.gitignore @@ -146,7 +146,6 @@ cscope.* /src/liblttng-ust-libc-wrapper/Makefile /src/liblttng-ust-python-agent/Makefile /src/liblttng-ust/Makefile -/src/libmsgpack/Makefile /src/libringbuffer/Makefile /src/python-lttngust/Makefile /src/Makefile diff --git a/configure.ac b/configure.ac index 4c6eac89..c9bf1e86 100644 --- a/configure.ac +++ b/configure.ac @@ -540,7 +540,6 @@ AC_CONFIG_FILES([ src/liblttng-ust-libc-wrapper/Makefile src/liblttng-ust/Makefile src/liblttng-ust-python-agent/Makefile - src/libmsgpack/Makefile src/libringbuffer/Makefile src/lttng-ust-ctl.pc src/lttng-ust.pc diff --git a/src/Makefile.am b/src/Makefile.am index 28a32ba5..a5e8ac94 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,6 @@ SUBDIRS = \ libringbuffer \ liblttng-ust-comm \ libcounter \ - libmsgpack \ liblttng-ust \ liblttng-ust-ctl \ liblttng-ust-fd \ diff --git a/src/common/Makefile.am b/src/common/Makefile.am index e73cc1fa..419561eb 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -38,9 +38,17 @@ noinst_HEADERS += \ ### ### noinst_LTLIBRARIES = \ + msgpack/libmsgpack.la \ snprintf/libsnprintf.la \ libcommon.la +# msgpack +msgpack_libmsgpack_la_SOURCES = \ + msgpack/msgpack.c \ + msgpack/msgpack.h + +msgpack_libmsgpack_la_CFLAGS = -DUST_COMPONENT="libmsgpack" $(AM_CFLAGS) + # snprintf snprintf_libsnprintf_la_SOURCES = \ snprintf/fflush.c \ @@ -63,6 +71,7 @@ libcommon_la_SOURCES = \ patient.c libcommon_la_LIBADD = \ + msgpack/libmsgpack.la \ snprintf/libsnprintf.la EXTRA_DIST = snprintf/README diff --git a/src/libmsgpack/msgpack.c b/src/common/msgpack/msgpack.c similarity index 100% rename from src/libmsgpack/msgpack.c rename to src/common/msgpack/msgpack.c diff --git a/src/libmsgpack/msgpack.h b/src/common/msgpack/msgpack.h similarity index 100% rename from src/libmsgpack/msgpack.h rename to src/common/msgpack/msgpack.h diff --git a/src/liblttng-ust/Makefile.am b/src/liblttng-ust/Makefile.am index 8892ff32..eb77c950 100644 --- a/src/liblttng-ust/Makefile.am +++ b/src/liblttng-ust/Makefile.am @@ -139,7 +139,6 @@ liblttng_ust_la_LIBADD = \ $(top_builddir)/src/liblttng-ust-comm/liblttng-ust-comm.la \ liblttng-ust-tracepoint.la \ liblttng-ust-runtime.la liblttng-ust-support.la \ - $(top_builddir)/src/libmsgpack/libmsgpack.la \ $(DL_LIBS) liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" $(AM_CFLAGS) diff --git a/src/liblttng-ust/event-notifier-notification.c b/src/liblttng-ust/event-notifier-notification.c index aab66ab2..32886fdb 100644 --- a/src/liblttng-ust/event-notifier-notification.c +++ b/src/liblttng-ust/event-notifier-notification.c @@ -16,7 +16,7 @@ #include "lttng-tracer-core.h" #include "ust-events-internal.h" -#include "../libmsgpack/msgpack.h" +#include "common/msgpack/msgpack.h" #include "lttng-bytecode.h" #include "common/patient.h" diff --git a/src/libmsgpack/Makefile.am b/src/libmsgpack/Makefile.am deleted file mode 100644 index 53b16842..00000000 --- a/src/libmsgpack/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -AM_CFLAGS += -fno-strict-aliasing - -noinst_LTLIBRARIES = libmsgpack.la - -libmsgpack_la_SOURCES = \ - msgpack.c msgpack.h - -libmsgpack_la_CFLAGS = -DUST_COMPONENT="libmsgpack" $(AM_CFLAGS) diff --git a/tests/unit/libmsgpack/Makefile.am b/tests/unit/libmsgpack/Makefile.am index 60afc0ec..857b62b4 100644 --- a/tests/unit/libmsgpack/Makefile.am +++ b/tests/unit/libmsgpack/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils noinst_PROGRAMS = test_msgpack test_msgpack_SOURCES = test_msgpack.c test_msgpack_LDADD = \ - $(top_builddir)/src/libmsgpack/libmsgpack.la \ + $(top_builddir)/src/common/msgpack/libmsgpack.la \ $(top_builddir)/tests/utils/libtap.a test_msgpack_CFLAGS = $(AM_CFLAGS) diff --git a/tests/unit/libmsgpack/test_msgpack.c b/tests/unit/libmsgpack/test_msgpack.c index 2e1828d4..339e20be 100644 --- a/tests/unit/libmsgpack/test_msgpack.c +++ b/tests/unit/libmsgpack/test_msgpack.c @@ -12,7 +12,7 @@ #include "tap.h" -#include "../../src/libmsgpack/msgpack.h" +#include "common/msgpack/msgpack.h" #define BUFFER_SIZE 4096 #define NUM_TESTS 23 -- 2.34.1