From 67534785e151f4c78aa5697703c55c5193deb65c Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 2 Apr 2021 19:35:53 -0400 Subject: [PATCH] Move libustcomm to 'src/common/' libustcomm is an internal convience library used by both liblttng-ust and liblttng-ust-ctl, move it to the common directory. This is part of an effort to standardize our autotools setup across projects to simplify maintenance. Change-Id: I6ec03e5d4fb0f49dee4dc57ba16ee025dd1151a2 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- .gitignore | 1 - configure.ac | 1 - src/Makefile.am | 1 - src/common/Makefile.am | 10 +++++++--- .../lttng-ust-comm.c => common/ustcomm.c} | 0 src/common/ustcomm.h | 6 +++--- src/lib/lttng-ust-ctl/Makefile.am | 2 +- src/liblttng-ust-comm/Makefile.am | 5 ----- src/liblttng-ust/Makefile.am | 2 +- 9 files changed, 12 insertions(+), 16 deletions(-) rename src/{liblttng-ust-comm/lttng-ust-comm.c => common/ustcomm.c} (100%) delete mode 100644 src/liblttng-ust-comm/Makefile.am diff --git a/.gitignore b/.gitignore index 2dc1914c..3475a8fc 100644 --- a/.gitignore +++ b/.gitignore @@ -125,7 +125,6 @@ cscope.* /doc/man/Makefile /include/Makefile /src/common/Makefile -/src/liblttng-ust-comm/Makefile /src/lib/lttng-ust-ctl/Makefile /src/lib/lttng-ust-cyg-profile/Makefile /src/lib/lttng-ust-dl/Makefile diff --git a/configure.ac b/configure.ac index 21dee733..561eb08c 100644 --- a/configure.ac +++ b/configure.ac @@ -519,7 +519,6 @@ AC_CONFIG_FILES([ doc/man/Makefile include/Makefile src/common/Makefile - src/liblttng-ust-comm/Makefile src/lib/lttng-ust-ctl/Makefile src/lib/lttng-ust-cyg-profile/Makefile src/lib/lttng-ust-dl/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 5f958375..80fc8c3f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,6 @@ SUBDIRS = \ common \ - liblttng-ust-comm \ liblttng-ust \ lib diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 2fbc8fff..fdbbc05c 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -15,8 +15,7 @@ noinst_HEADERS = \ logging.h \ macros.h \ patient.h \ - safe-snprintf.h \ - ustcomm.h + safe-snprintf.h noinst_HEADERS += \ compat/dlfcn.h \ @@ -42,7 +41,8 @@ noinst_LTLIBRARIES = \ msgpack/libmsgpack.la \ libringbuffer.la \ snprintf/libsnprintf.la \ - libcommon.la + libcommon.la \ + libustcomm.la # counter libcounter_la_SOURCES = \ @@ -133,4 +133,8 @@ libcommon_la_LIBADD = \ msgpack/libmsgpack.la \ snprintf/libsnprintf.la +libustcomm_la_SOURCES = \ + ustcomm.c \ + ustcomm.h + EXTRA_DIST = snprintf/README diff --git a/src/liblttng-ust-comm/lttng-ust-comm.c b/src/common/ustcomm.c similarity index 100% rename from src/liblttng-ust-comm/lttng-ust-comm.c rename to src/common/ustcomm.c diff --git a/src/common/ustcomm.h b/src/common/ustcomm.h index 81ce885d..dac9aaed 100644 --- a/src/common/ustcomm.h +++ b/src/common/ustcomm.h @@ -11,8 +11,8 @@ * These declarations should NOT be considered stable API. */ -#ifndef _UST_COMMON_USTCOMM_H -#define _UST_COMMON_USTCOMM_H +#ifndef _UST_COMMON_UST_COMM_H +#define _UST_COMMON_UST_COMM_H #include #include @@ -324,4 +324,4 @@ int ustcomm_setsockopt_rcv_timeout(int sock, unsigned int msec) int ustcomm_setsockopt_snd_timeout(int sock, unsigned int msec) __attribute__((visibility("hidden"))); -#endif /* _UST_COMMON_USTCOMM_H */ +#endif /* _UST_COMMON_UST_COMM_H */ diff --git a/src/lib/lttng-ust-ctl/Makefile.am b/src/lib/lttng-ust-ctl/Makefile.am index 35999217..1d4eef33 100644 --- a/src/lib/lttng-ust-ctl/Makefile.am +++ b/src/lib/lttng-ust-ctl/Makefile.am @@ -11,7 +11,7 @@ liblttng_ust_ctl_la_LDFLAGS = \ liblttng_ust_ctl_la_LIBADD = \ $(top_builddir)/src/liblttng-ust/liblttng-ust-common.la \ - $(top_builddir)/src/liblttng-ust-comm/liblttng-ust-comm.la \ $(top_builddir)/src/liblttng-ust/liblttng-ust-support.la \ + $(top_builddir)/src/common/libustcomm.la \ $(top_builddir)/src/common/libcommon.la \ $(DL_LIBS) diff --git a/src/liblttng-ust-comm/Makefile.am b/src/liblttng-ust-comm/Makefile.am deleted file mode 100644 index cad9c4ef..00000000 --- a/src/liblttng-ust-comm/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-only - -noinst_LTLIBRARIES = liblttng-ust-comm.la - -liblttng_ust_comm_la_SOURCES = lttng-ust-comm.c diff --git a/src/liblttng-ust/Makefile.am b/src/liblttng-ust/Makefile.am index 87380bc4..d064fad6 100644 --- a/src/liblttng-ust/Makefile.am +++ b/src/liblttng-ust/Makefile.am @@ -141,8 +141,8 @@ liblttng_ust_support_la_LIBADD = \ liblttng_ust_la_LIBADD = \ -lrt \ liblttng-ust-common.la \ + $(top_builddir)/src/common/libustcomm.la \ $(top_builddir)/src/common/libcommon.la \ - $(top_builddir)/src/liblttng-ust-comm/liblttng-ust-comm.la \ liblttng-ust-tracepoint.la \ liblttng-ust-runtime.la liblttng-ust-support.la \ $(DL_LIBS) -- 2.34.1