From 4ae042345b4094e98611744d9ba6c92265058fdb Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 19 Nov 2021 15:40:09 -0500 Subject: [PATCH] src/common: use single Makefile for parallel builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use a single Makefile in 'src/common' as it contains multiple subdirectories with a small number of objects to compile. This allows faster parallel builds since parallelism in automake is applied per Makefile. There is anectodal evidence of a 25 seconds improvement to the build process on a 36 core machine. Change-Id: If2ce266050e345d58b00bf65b574ccf5168f28f1 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- configure.ac | 19 - extras/bindings/swig/python/Makefile.am | 2 +- src/bin/lttng-consumerd/Makefile.am | 8 +- src/bin/lttng-crash/Makefile.am | 2 +- src/bin/lttng-relayd/Makefile.am | 10 +- src/bin/lttng-sessiond/Makefile.am | 16 +- src/bin/lttng/Makefile.am | 10 +- src/common/Makefile.am | 366 ++++++++++++++---- src/common/argpar-utils/Makefile.am | 5 - src/common/argpar/Makefile.am | 3 - src/common/bytecode/Makefile.am | 7 - src/common/compat/Makefile.am | 24 -- src/common/config/Makefile.am | 29 -- src/common/consumer/Makefile.am | 26 -- src/common/fd-tracker/Makefile.am | 12 - src/common/filter/Makefile.am | 62 --- src/common/hashtable/Makefile.am | 17 - src/common/health/Makefile.am | 5 - src/common/index/Makefile.am | 8 - src/common/ini-config/Makefile.am | 9 - src/common/kernel-consumer/Makefile.am | 9 - src/common/kernel-ctl/Makefile.am | 8 - src/common/relayd/Makefile.am | 9 - src/common/{config => }/session.xsd | 0 src/common/sessiond-comm/Makefile.am | 13 - src/common/string-utils/Makefile.am | 8 - src/common/testpoint/Makefile.am | 8 - src/common/ust-consumer/Makefile.am | 13 - src/lib/lttng-ctl/Makefile.am | 2 +- .../regression/tools/notification/Makefile.am | 2 +- .../regression/tools/save-load/test_autoload | 2 +- tests/regression/tools/save-load/test_load | 2 +- .../tools/trigger/utils/Makefile.am | 4 +- tests/unit/Makefile.am | 12 +- tests/utils/utils.sh | 4 +- 35 files changed, 331 insertions(+), 405 deletions(-) delete mode 100644 src/common/argpar-utils/Makefile.am delete mode 100644 src/common/argpar/Makefile.am delete mode 100644 src/common/bytecode/Makefile.am delete mode 100644 src/common/compat/Makefile.am delete mode 100644 src/common/config/Makefile.am delete mode 100644 src/common/consumer/Makefile.am delete mode 100644 src/common/fd-tracker/Makefile.am delete mode 100644 src/common/filter/Makefile.am delete mode 100644 src/common/hashtable/Makefile.am delete mode 100644 src/common/health/Makefile.am delete mode 100644 src/common/index/Makefile.am delete mode 100644 src/common/ini-config/Makefile.am delete mode 100644 src/common/kernel-consumer/Makefile.am delete mode 100644 src/common/kernel-ctl/Makefile.am delete mode 100644 src/common/relayd/Makefile.am rename src/common/{config => }/session.xsd (100%) delete mode 100644 src/common/sessiond-comm/Makefile.am delete mode 100644 src/common/string-utils/Makefile.am delete mode 100644 src/common/testpoint/Makefile.am delete mode 100644 src/common/ust-consumer/Makefile.am diff --git a/configure.ac b/configure.ac index 6166b25a0..a8f595a2c 100644 --- a/configure.ac +++ b/configure.ac @@ -1142,25 +1142,6 @@ AC_CONFIG_FILES([ extras/core-handler/Makefile src/Makefile src/common/Makefile - src/common/argpar/Makefile - src/common/argpar-utils/Makefile - src/common/bytecode/Makefile - src/common/kernel-ctl/Makefile - src/common/kernel-consumer/Makefile - src/common/consumer/Makefile - src/common/ust-consumer/Makefile - src/common/hashtable/Makefile - src/common/sessiond-comm/Makefile - src/common/compat/Makefile - src/common/relayd/Makefile - src/common/testpoint/Makefile - src/common/index/Makefile - src/common/health/Makefile - src/common/config/Makefile - src/common/ini-config/Makefile - src/common/string-utils/Makefile - src/common/fd-tracker/Makefile - src/common/filter/Makefile src/lib/Makefile src/lib/lttng-ctl/Makefile src/lib/lttng-ctl/lttng-ctl.pc diff --git a/extras/bindings/swig/python/Makefile.am b/extras/bindings/swig/python/Makefile.am index 73428d9be..15dea077d 100644 --- a/extras/bindings/swig/python/Makefile.am +++ b/extras/bindings/swig/python/Makefile.am @@ -21,7 +21,7 @@ MAINTAINERCLEANFILES = lttng_wrap.c lttng.py nodist__lttng_la_SOURCES = lttng_wrap.c _lttng_la_LDFLAGS = -module _lttng_la_LIBADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ + $(top_builddir)/src/common/libsessiond-comm.la \ $(top_builddir)/src/common/libcommon-gpl.la lttng_wrap.c: lttng.i diff --git a/src/bin/lttng-consumerd/Makefile.am b/src/bin/lttng-consumerd/Makefile.am index 82df3e375..19bc7ed4c 100644 --- a/src/bin/lttng-consumerd/Makefile.am +++ b/src/bin/lttng-consumerd/Makefile.am @@ -9,11 +9,11 @@ lttng_consumerd_SOURCES = \ health-consumerd.h lttng_consumerd_LDADD = \ - $(top_builddir)/src/common/consumer/libconsumer.la \ + $(top_builddir)/src/common/libconsumer.la \ $(top_builddir)/src/common/libcommon-gpl.la \ - $(top_builddir)/src/common/index/libindex.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la + $(top_builddir)/src/common/libindex.la \ + $(top_builddir)/src/common/libhealth.la \ + $(top_builddir)/src/common/libtestpoint.la lttng_consumerd_LDFLAGS = -rdynamic diff --git a/src/bin/lttng-crash/Makefile.am b/src/bin/lttng-crash/Makefile.am index 5d3946b03..59a5bfa0c 100644 --- a/src/bin/lttng-crash/Makefile.am +++ b/src/bin/lttng-crash/Makefile.am @@ -11,4 +11,4 @@ bin_PROGRAMS = lttng-crash lttng_crash_SOURCES = lttng-crash.cpp lttng_crash_LDADD = $(top_builddir)/src/common/libcommon-gpl.la \ - $(top_builddir)/src/common/config/libconfig.la + $(top_builddir)/src/common/libconfig.la diff --git a/src/bin/lttng-relayd/Makefile.am b/src/bin/lttng-relayd/Makefile.am index 9fe11f287..afb435f06 100644 --- a/src/bin/lttng-relayd/Makefile.am +++ b/src/bin/lttng-relayd/Makefile.am @@ -30,8 +30,8 @@ lttng_relayd_SOURCES = main.cpp lttng-relayd.h utils.h utils.cpp cmd.h \ # link on liblttngctl for check if relayd is already alive. lttng_relayd_LDADD = $(URCU_LIBS) \ $(top_builddir)/src/common/libcommon-gpl.la \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/index/libindex.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la + $(top_builddir)/src/common/libsessiond-comm.la \ + $(top_builddir)/src/common/libcompat.la \ + $(top_builddir)/src/common/libindex.la \ + $(top_builddir)/src/common/libhealth.la \ + $(top_builddir)/src/common/libtestpoint.la diff --git a/src/bin/lttng-sessiond/Makefile.am b/src/bin/lttng-sessiond/Makefile.am index 85f9cea2c..96a20a4dd 100644 --- a/src/bin/lttng-sessiond/Makefile.am +++ b/src/bin/lttng-sessiond/Makefile.am @@ -70,15 +70,15 @@ endif # link on liblttngctl for check if sessiond is already alive. liblttng_sessiond_common_la_LIBADD = $(URCU_LIBS) $(KMOD_LIBS) \ $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ - $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ + $(top_builddir)/src/common/libsessiond-comm.la \ + $(top_builddir)/src/common/libkernel-ctl.la \ $(top_builddir)/src/common/libcommon-gpl.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/relayd/librelayd.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/string-utils/libstring-utils.la + $(top_builddir)/src/common/libcompat.la \ + $(top_builddir)/src/common/librelayd.la \ + $(top_builddir)/src/common/libtestpoint.la \ + $(top_builddir)/src/common/libhealth.la \ + $(top_builddir)/src/common/libconfig.la \ + $(top_builddir)/src/common/libstring-utils.la if HAVE_LIBLTTNG_UST_CTL diff --git a/src/bin/lttng/Makefile.am b/src/bin/lttng/Makefile.am index b06c95bd7..67bd92097 100644 --- a/src/bin/lttng/Makefile.am +++ b/src/bin/lttng/Makefile.am @@ -41,9 +41,9 @@ lttng_CXXFLAGS = $(AM_CXXFLAGS) $(POPT_CFLAGS) lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ $(top_builddir)/src/common/libcommon-lgpl.la \ $(top_builddir)/src/common/libpath.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/string-utils/libstring-utils.la \ - $(top_builddir)/src/common/filter/libfilter.la \ - $(top_builddir)/src/common/argpar-utils/libargpar-utils.la \ - $(top_builddir)/src/common/argpar/libargpar.la \ + $(top_builddir)/src/common/libconfig.la \ + $(top_builddir)/src/common/libstring-utils.la \ + $(top_builddir)/src/common/libfilter.la \ + $(top_builddir)/src/common/libargpar-utils.la \ + $(top_builddir)/src/common/libargpar.la \ $(POPT_LIBS) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 1ac4874a0..613e03a4a 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,50 +1,50 @@ # SPDX-License-Identifier: GPL-2.0-only AUTOMAKE_OPTIONS = subdir-objects +noinst_LTLIBRARIES = + +BUILT_SOURCES = + +noinst_HEADERS = \ + align.h \ + bug.h \ + defaults.h \ + error.h \ + futex.h \ + lttng-kernel.h \ + lttng-kernel-old.h \ + macros.h \ + time.h \ + uri.h \ + utils.h + + +# libargpar +noinst_LTLIBRARIES += libargpar.la +libargpar_la_SOURCES = \ + argpar/argpar.c \ + argpar/argpar.h + + +# libargpar-utils +noinst_LTLIBRARIES += libargpar-utils.la +libargpar_utils_la_SOURCES = \ + argpar-utils/argpar-utils.cpp \ + argpar-utils/argpar-utils.h + + +# libbytecode +noinst_LTLIBRARIES += libbytecode.la +libbytecode_la_SOURCES = \ + bytecode/bytecode.cpp \ + bytecode/bytecode.h -SUBDIRS = \ - argpar \ - bytecode \ - compat \ - config \ - ini-config \ - fd-tracker \ - string-utils \ - filter \ - hashtable \ - argpar-utils - -# Make sure to always distribute all folders -# since SUBDIRS is decided at configure time. -DIST_SUBDIRS = \ - compat \ - health \ - hashtable \ - kernel-ctl \ - sessiond-comm \ - relayd \ - kernel-consumer \ - ust-consumer \ - testpoint \ - index \ - config \ - ini-config \ - consumer \ - string-utils \ - fd-tracker \ - bytecode \ - filter \ - argpar \ - argpar-utils - -# Common library -noinst_LTLIBRARIES = libpath.la libcommon-lgpl.la libcommon-gpl.la -EXTRA_DIST = mi-lttng-4.1.xsd # The libcommon-lgpl static archive contains only LGPLv2.1 code. It is # meant to be used by LGPLv2.1 libraries such as liblttng-ctl. It also # contains libcommon-lgpl.la. +noinst_LTLIBRARIES += libcommon-lgpl.la libcommon_lgpl_la_SOURCES = \ actions/action.cpp \ actions/list.cpp \ @@ -109,22 +109,24 @@ libcommon_lgpl_la_SOURCES += \ endif libcommon_lgpl_la_LIBADD = \ - $(top_builddir)/src/common/bytecode/libbytecode.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/filter/libfilter.la \ - $(top_builddir)/src/common/hashtable/libhashtable-lgpl.la \ + libbytecode.la \ + libcompat.la \ + libconfig.la \ + libfilter.la \ + libhashtable-lgpl.la \ $(top_builddir)/src/vendor/msgpack/libmsgpack.la + # The libpath static archive contains GPLv2 compatible code. It is # meant to be used by GPL executables. - +noinst_LTLIBRARIES += libpath.la libpath_la_SOURCES = \ path.cpp path.h + # The libcommon-gpl static archive contains GPLv2 compatible code. It is # meant to be used by GPL executables. - +noinst_LTLIBRARIES += libcommon-gpl.la libcommon_gpl_la_SOURCES = \ common.h \ context.cpp context.h \ @@ -145,64 +147,282 @@ libcommon_gpl_la_SOURCES = \ libcommon_gpl_la_LIBADD = \ libcommon-lgpl.la \ libpath.la \ - $(top_builddir)/src/common/ini-config/libini-config.la \ - $(top_builddir)/src/common/hashtable/libhashtable-gpl.la \ - $(top_builddir)/src/common/fd-tracker/libfd-tracker.la + libini-config.la \ + libhashtable-gpl.la \ + libfd-tracker.la + + +# libcompat +noinst_LTLIBRARIES += libcompat.la +libcompat_la_SOURCES = \ + compat/compat-fcntl.cpp \ + compat/directory-handle.cpp \ + compat/directory-handle.h \ + compat/dirent.h \ + compat/endian.h \ + compat/errno.h \ + compat/fcntl.h \ + compat/getenv.h \ + compat/mman.h \ + compat/netdb.h \ + compat/path.h \ + compat/paths.h \ + compat/poll.cpp \ + compat/poll.h \ + compat/pthread.h \ + compat/socket.h \ + compat/string.h \ + compat/tid.h \ + compat/time.h + + +# libconfig +noinst_LTLIBRARIES += libconfig.la +libconfig_la_SOURCES = \ + config/config-internal.h \ + config/config-session-abi.h \ + config/session-config.cpp \ + config/session-config.h + +libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) +libconfig_la_LIBADD = ${libxml2_LIBS} + + +if BUILD_LIB_CONSUMER +noinst_LTLIBRARIES += libconsumer.la + +libconsumer_la_SOURCES = \ + consumer/consumer.cpp \ + consumer/consumer.h \ + consumer/consumer-metadata-cache.cpp \ + consumer/consumer-metadata-cache.h \ + consumer/consumer-stream.cpp \ + consumer/consumer-stream.h \ + consumer/consumer-testpoint.h \ + consumer/consumer-timer.cpp \ + consumer/consumer-timer.h \ + consumer/metadata-bucket.cpp \ + consumer/metadata-bucket.h + +libconsumer_la_LIBADD = \ + libkernel-consumer.la \ + librelayd.la \ + libsessiond-comm.la + +if HAVE_LIBLTTNG_UST_CTL +libconsumer_la_LIBADD += \ + libust-consumer.la +endif +endif # BUILD_LIB_CONSUMER + + +# libfd-tracker +noinst_LTLIBRARIES += libfd-tracker.la +libfd_tracker_la_SOURCES = \ + fd-tracker/fd-tracker.cpp \ + fd-tracker/fd-tracker.h \ + fd-tracker/inode.cpp \ + fd-tracker/inode.h \ + fd-tracker/utils.cpp \ + fd-tracker/utils.h \ + fd-tracker/utils-poll.cpp + + +# libfilter +noinst_LTLIBRARIES += libfilter.la + +libfilter_la_SOURCES = \ + filter/filter-ast.h \ + filter/filter-ir.h \ + filter/filter-lexer.lpp \ + filter/filter-parser.ypp \ + filter/filter-symbols.h \ + filter/filter-visitor-generate-bytecode.cpp \ + filter/filter-visitor-generate-ir.cpp \ + filter/filter-visitor-ir-check-binary-op-nesting.cpp \ + filter/filter-visitor-ir-normalize-glob-patterns.cpp \ + filter/filter-visitor-ir-validate-globbing.cpp \ + filter/filter-visitor-ir-validate-string.cpp \ + filter/filter-visitor-xml.cpp \ + filter/memstream.h + +BUILT_SOURCES += filter/filter-parser.hpp + +libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS) +libfilter_la_CPPFLAGS = -I$(srcdir)/filter -I$(builddir)/filter $(AM_CPPFLAGS) +libfilter_la_LIBADD = libstring-utils.la + +AM_YFLAGS = -t -d -v -Wno-yacc + +# start with empty files to clean +CLEANFILES = + +if HAVE_BISON +# we have bison: we can clean the generated parser files +CLEANFILES += \ + filter/filter-parser.cpp \ + filter/filter-parser.hpp \ + filter/filter-parser.output +else # HAVE_BISON +# create target used to stop the build if we want to build the parser, +# but we don't have the necessary tool to do so +filter/filter-parser.cpp filter/filter-parser.hpp: filter/filter-parser.ypp + @echo "Error: Cannot build target because bison is missing." + @echo "Make sure bison is installed and run the configure script again." + @false + +BUILT_SOURCES += filter/filter-parser.cpp filter/filter-parser.hpp +endif # HAVE_BISON + +if HAVE_FLEX +# we have flex: we can clean the generated lexer files +CLEANFILES += filter/filter-lexer.cpp +else # HAVE_FLEX +# create target used to stop the build if we want to build the lexer, +# but we don't have the necessary tool to do so +filter/filter-lexer.cpp: filter/filter-lexer.lpp + @echo "Error: Cannot build target because flex is missing." + @echo "Make sure flex is installed and run the configure script again." + @false + +BUILT_SOURCES += filter/filter-lexer.cpp +endif # HAVE_FLEX + + +noinst_LTLIBRARIES += libhashtable-lgpl.la +libhashtable_lgpl_la_SOURCES = \ + hashtable/seed.cpp \ + hashtable/utils.cpp \ + hashtable/utils.h + + +noinst_LTLIBRARIES += libhashtable-gpl.la +libhashtable_gpl_la_SOURCES = \ + hashtable/hashtable.cpp \ + hashtable/hashtable.h \ + hashtable/hashtable-symbols.h + +libhashtable_gpl_la_LIBADD = \ + $(URCU_LIBS) \ + $(URCU_CDS_LIBS) + if BUILD_LIB_HEALTH -SUBDIRS += health +noinst_LTLIBRARIES += libhealth.la + +libhealth_la_SOURCES = \ + health/health.cpp endif + +# libini-config +noinst_LTLIBRARIES += libini-config.la +libini_config_la_SOURCES = \ + ini-config/ini.cpp \ + ini-config/ini.h \ + ini-config/ini-config.cpp \ + ini-config/ini-config.h + + +if BUILD_LIB_INDEX +noinst_LTLIBRARIES += libindex.la + +libindex_la_SOURCES = \ + index/ctf-index.h \ + index/index.cpp \ + index/index.h +endif + + if BUILD_LIB_KERNEL_CTL -SUBDIRS += kernel-ctl +noinst_LTLIBRARIES += libkernel-ctl.la + +libkernel_ctl_la_SOURCES = \ + kernel-ctl/kernel-ctl.cpp \ + kernel-ctl/kernel-ctl.h \ + kernel-ctl/kernel-ioctl.h endif if BUILD_LIB_SESSIOND_COMM -SUBDIRS += sessiond-comm +noinst_LTLIBRARIES += libsessiond-comm.la + +libsessiond_comm_la_SOURCES = \ + sessiond-comm/agent.h \ + sessiond-comm/inet.cpp \ + sessiond-comm/inet.h \ + sessiond-comm/inet6.cpp \ + sessiond-comm/inet6.h \ + sessiond-comm/relayd.h \ + sessiond-comm/sessiond-comm.cpp \ + sessiond-comm/sessiond-comm.h endif if BUILD_LIB_RELAYD -SUBDIRS += relayd +noinst_LTLIBRARIES += librelayd.la + +librelayd_la_SOURCES = \ + relayd/relayd.cpp \ + relayd/relayd.h + +librelayd_la_LIBADD = libsessiond-comm.la endif if BUILD_LIB_KERNEL_CONSUMER -SUBDIRS += kernel-consumer +noinst_LTLIBRARIES += libkernel-consumer.la + +libkernel_consumer_la_SOURCES = \ + kernel-consumer/kernel-consumer.cpp \ + kernel-consumer/kernel-consumer.h + +libkernel_consumer_la_LIBADD = \ + libkernel-ctl.la endif if BUILD_LIB_UST_CONSUMER -SUBDIRS += ust-consumer +if HAVE_LIBLTTNG_UST_CTL +noinst_LTLIBRARIES += libust-consumer.la + +libust_consumer_la_SOURCES = \ + ust-consumer/ust-consumer.cpp \ + ust-consumer/ust-consumer.h + +libust_consumer_la_LIBADD = \ + $(UST_CTL_LIBS) +endif endif if BUILD_LIB_TESTPOINT -SUBDIRS += testpoint -endif +noinst_LTLIBRARIES += libtestpoint.la -if BUILD_LIB_INDEX -SUBDIRS += index -endif +libtestpoint_la_SOURCES = \ + testpoint/testpoint.cpp \ + testpoint/testpoint.h -if BUILD_LIB_CONSUMER -SUBDIRS += consumer +libtestpoint_la_LIBADD = $(DL_LIBS) endif -noinst_HEADERS = \ - align.h \ - bug.h \ - defaults.h \ - error.h \ - futex.h \ - lttng-kernel.h \ - lttng-kernel-old.h \ - macros.h \ - time.h \ - uri.h \ - utils.h + +# libstring-utils +noinst_LTLIBRARIES += libstring-utils.la +libstring_utils_la_SOURCES = \ + string-utils/format.h \ + string-utils/string-utils.cpp \ + string-utils/string-utils.h + noinst_PROGRAMS = filter-grammar-test filter_grammar_test_SOURCES = filter-grammar-test.cpp filter_grammar_test_LDADD = libcommon-gpl.la +EXTRA_DIST = \ + mi-lttng-4.1.xsd \ + session.xsd + +xmldir = $(datadir)/xml/lttng +dist_xml_DATA = session.xsd + +# Copy EXTRA_DIST files to the build directory all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ for script in $(EXTRA_DIST); do \ diff --git a/src/common/argpar-utils/Makefile.am b/src/common/argpar-utils/Makefile.am deleted file mode 100644 index 53425cd32..000000000 --- a/src/common/argpar-utils/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -noinst_LTLIBRARIES = libargpar-utils.la - -libargpar_utils_la_SOURCES = \ - argpar-utils.cpp \ - argpar-utils.h diff --git a/src/common/argpar/Makefile.am b/src/common/argpar/Makefile.am deleted file mode 100644 index 175526abe..000000000 --- a/src/common/argpar/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -noinst_LTLIBRARIES = libargpar.la - -libargpar_la_SOURCES = argpar.c argpar.h diff --git a/src/common/bytecode/Makefile.am b/src/common/bytecode/Makefile.am deleted file mode 100644 index ac7509bec..000000000 --- a/src/common/bytecode/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libbytecode.la - -libbytecode_la_SOURCES = \ - bytecode.cpp \ - bytecode.h diff --git a/src/common/compat/Makefile.am b/src/common/compat/Makefile.am deleted file mode 100644 index 0499b3568..000000000 --- a/src/common/compat/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libcompat.la - -libcompat_la_SOURCES = \ - compat-fcntl.cpp \ - directory-handle.cpp \ - directory-handle.h \ - dirent.h \ - endian.h \ - errno.h \ - fcntl.h \ - getenv.h \ - mman.h \ - netdb.h \ - path.h \ - paths.h \ - poll.cpp \ - poll.h \ - pthread.h \ - socket.h \ - string.h \ - tid.h \ - time.h diff --git a/src/common/config/Makefile.am b/src/common/config/Makefile.am deleted file mode 100644 index a273523cf..000000000 --- a/src/common/config/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libconfig.la - -libconfig_la_SOURCES = \ - config-internal.h \ - config-session-abi.h \ - session-config.cpp \ - session-config.h -libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) -libconfig_la_LIBADD = ${libxml2_LIBS} - -xmldir = $(datadir)/xml/lttng -dist_xml_DATA = session.xsd -EXTRA_DIST = session.xsd - -all-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ - cp -f $(srcdir)/$$script $(builddir); \ - done; \ - fi - -clean-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ - rm -f $(builddir)/$$script; \ - done; \ - fi diff --git a/src/common/consumer/Makefile.am b/src/common/consumer/Makefile.am deleted file mode 100644 index 46810d116..000000000 --- a/src/common/consumer/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libconsumer.la - -noinst_HEADERS = consumer-metadata-cache.h consumer-timer.h \ - consumer-testpoint.h - -libconsumer_la_SOURCES = \ - consumer.cpp \ - consumer.h \ - consumer-metadata-cache.cpp \ - consumer-stream.cpp \ - consumer-stream.h \ - consumer-timer.cpp \ - metadata-bucket.cpp \ - metadata-bucket.h - -libconsumer_la_LIBADD = \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ - $(top_builddir)/src/common/kernel-consumer/libkernel-consumer.la \ - $(top_builddir)/src/common/relayd/librelayd.la - -if HAVE_LIBLTTNG_UST_CTL -libconsumer_la_LIBADD += \ - $(top_builddir)/src/common/ust-consumer/libust-consumer.la -endif diff --git a/src/common/fd-tracker/Makefile.am b/src/common/fd-tracker/Makefile.am deleted file mode 100644 index 68e63d42b..000000000 --- a/src/common/fd-tracker/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libfd-tracker.la - -libfd_tracker_la_SOURCES = \ - fd-tracker.cpp \ - fd-tracker.h \ - inode.cpp \ - inode.h \ - utils.cpp \ - utils.h \ - utils-poll.cpp diff --git a/src/common/filter/Makefile.am b/src/common/filter/Makefile.am deleted file mode 100644 index 4a6e4ff8d..000000000 --- a/src/common/filter/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -AM_CPPFLAGS += -I$(srcdir) -I$(builddir) - -noinst_LTLIBRARIES = libfilter.la -noinst_HEADERS = filter-ast.h \ - filter-symbols.h - -BUILT_SOURCES = filter-parser.hpp - -libfilter_la_SOURCES = \ - filter-lexer.lpp \ - filter-parser.ypp \ - filter-visitor-xml.cpp \ - filter-visitor-generate-ir.cpp \ - filter-visitor-ir-check-binary-op-nesting.cpp \ - filter-visitor-ir-validate-string.cpp \ - filter-visitor-ir-validate-globbing.cpp \ - filter-visitor-ir-normalize-glob-patterns.cpp \ - filter-visitor-generate-bytecode.cpp \ - filter-ast.h \ - filter-ir.h \ - memstream.h -libfilter_la_CXXFLAGS = -include filter-symbols.h $(AM_CXXFLAGS) -libfilter_la_LIBADD = $(top_builddir)/src/common/string-utils/libstring-utils.la - -AM_YFLAGS = -t -d -v -Wno-yacc - -# start with empty files to clean -CLEANFILES = - -if HAVE_BISON -# we have bison: we can clean the generated parser files -CLEANFILES += filter-parser.cpp filter-parser.hpp filter-parser.output -else # HAVE_BISON -# create target used to stop the build if we want to build the parser, -# but we don't have the necessary tool to do so -ERR_MSG = "Error: Cannot build target because bison is missing." -ERR_MSG += "Make sure bison is installed and run the configure script again." - -filter-parser.cpp filter-parser.hpp: filter-parser.ypp - @echo $(ERR_MSG) - @false - -all-local: filter-parser.cpp filter-parser.hpp -endif # HAVE_BISON - -if HAVE_FLEX -# we have flex: we can clean the generated lexer files -CLEANFILES += filter-lexer.cpp -else # HAVE_FLEX -# create target used to stop the build if we want to build the lexer, -# but we don't have the necessary tool to do so -ERR_MSG = "Error: Cannot build target because flex is missing." -ERR_MSG += "Make sure flex is installed and run the configure script again." - -filter-lexer.cpp: filter-lexer.lpp - @echo $(ERR_MSG) - @false - -all-local: filter-lexer.cpp -endif # HAVE_FLEX diff --git a/src/common/hashtable/Makefile.am b/src/common/hashtable/Makefile.am deleted file mode 100644 index f16b1b513..000000000 --- a/src/common/hashtable/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libhashtable-gpl.la libhashtable-lgpl.la - -libhashtable_lgpl_la_SOURCES = \ - seed.cpp \ - utils.cpp \ - utils.h - -libhashtable_gpl_la_SOURCES = \ - hashtable.cpp \ - hashtable.h \ - hashtable-symbols.h - -libhashtable_gpl_la_LIBADD = \ - $(URCU_LIBS) \ - $(URCU_CDS_LIBS) diff --git a/src/common/health/Makefile.am b/src/common/health/Makefile.am deleted file mode 100644 index cb10139f8..000000000 --- a/src/common/health/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libhealth.la - -libhealth_la_SOURCES = health.cpp diff --git a/src/common/index/Makefile.am b/src/common/index/Makefile.am deleted file mode 100644 index d62a31c30..000000000 --- a/src/common/index/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libindex.la - -libindex_la_SOURCES = \ - ctf-index.h \ - index.cpp \ - index.h diff --git a/src/common/ini-config/Makefile.am b/src/common/ini-config/Makefile.am deleted file mode 100644 index 7f0ee8dfe..000000000 --- a/src/common/ini-config/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libini-config.la - -libini_config_la_SOURCES = \ - ini.cpp \ - ini.h \ - ini-config.cpp \ - ini-config.h diff --git a/src/common/kernel-consumer/Makefile.am b/src/common/kernel-consumer/Makefile.am deleted file mode 100644 index 4e7205cbe..000000000 --- a/src/common/kernel-consumer/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libkernel-consumer.la - -libkernel_consumer_la_SOURCES = \ - kernel-consumer.cpp \ - kernel-consumer.h - -libkernel_consumer_la_LIBADD = $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la diff --git a/src/common/kernel-ctl/Makefile.am b/src/common/kernel-ctl/Makefile.am deleted file mode 100644 index 976cfdbc8..000000000 --- a/src/common/kernel-ctl/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libkernel-ctl.la - -libkernel_ctl_la_SOURCES = \ - kernel-ctl.cpp \ - kernel-ctl.h \ - kernel-ioctl.h diff --git a/src/common/relayd/Makefile.am b/src/common/relayd/Makefile.am deleted file mode 100644 index 32623cccc..000000000 --- a/src/common/relayd/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = librelayd.la - -librelayd_la_SOURCES = \ - relayd.cpp \ - relayd.h - -librelayd_la_LIBADD = $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la diff --git a/src/common/config/session.xsd b/src/common/session.xsd similarity index 100% rename from src/common/config/session.xsd rename to src/common/session.xsd diff --git a/src/common/sessiond-comm/Makefile.am b/src/common/sessiond-comm/Makefile.am deleted file mode 100644 index 8086cb010..000000000 --- a/src/common/sessiond-comm/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libsessiond-comm.la - -libsessiond_comm_la_SOURCES = \ - agent.h \ - inet.cpp \ - inet.h \ - inet6.cpp \ - inet6.h \ - relayd.h \ - sessiond-comm.cpp \ - sessiond-comm.h diff --git a/src/common/string-utils/Makefile.am b/src/common/string-utils/Makefile.am deleted file mode 100644 index 212b3d567..000000000 --- a/src/common/string-utils/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libstring-utils.la - -libstring_utils_la_SOURCES = \ - format.h \ - string-utils.cpp \ - string-utils.h diff --git a/src/common/testpoint/Makefile.am b/src/common/testpoint/Makefile.am deleted file mode 100644 index 7fd8ed76e..000000000 --- a/src/common/testpoint/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -noinst_LTLIBRARIES = libtestpoint.la - -libtestpoint_la_SOURCES = \ - testpoint.cpp \ - testpoint.h -libtestpoint_la_LIBADD = $(DL_LIBS) diff --git a/src/common/ust-consumer/Makefile.am b/src/common/ust-consumer/Makefile.am deleted file mode 100644 index 5e1005372..000000000 --- a/src/common/ust-consumer/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -if HAVE_LIBLTTNG_UST_CTL - -noinst_LTLIBRARIES = libust-consumer.la - -libust_consumer_la_SOURCES = \ - ust-consumer.cpp \ - ust-consumer.h - -libust_consumer_la_LIBADD = $(UST_CTL_LIBS) - -endif diff --git a/src/lib/lttng-ctl/Makefile.am b/src/lib/lttng-ctl/Makefile.am index 281806c1f..59fadf1c7 100644 --- a/src/lib/lttng-ctl/Makefile.am +++ b/src/lib/lttng-ctl/Makefile.am @@ -30,7 +30,7 @@ EXTRA_liblttng_ctl_la_DEPENDENCIES = liblttng-ctl.sym EXTRA_DIST = liblttng-ctl.sym liblttng_ctl_la_LIBADD = \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ + $(top_builddir)/src/common/libsessiond-comm.la \ $(top_builddir)/src/common/libcommon-lgpl.la pkgconfigdir = $(libdir)/pkgconfig diff --git a/tests/regression/tools/notification/Makefile.am b/tests/regression/tools/notification/Makefile.am index a59ee8d6d..eb5198b4b 100644 --- a/tests/regression/tools/notification/Makefile.am +++ b/tests/regression/tools/notification/Makefile.am @@ -37,7 +37,7 @@ FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ libpause_consumer_la_SOURCES = consumer_testpoints.cpp libpause_consumer_la_LIBADD = \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ + $(top_builddir)/src/common/libsessiond-comm.la \ $(top_builddir)/src/common/libcommon-gpl.la \ $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ $(DL_LIBS) diff --git a/tests/regression/tools/save-load/test_autoload b/tests/regression/tools/save-load/test_autoload index b1134266a..ddf54db59 100755 --- a/tests/regression/tools/save-load/test_autoload +++ b/tests/regression/tools/save-load/test_autoload @@ -9,7 +9,7 @@ TEST_DESC="Auto load session(s)" CURDIR=$(dirname $0)/ CONFIG_DIR="${CURDIR}/configuration" TESTDIR=$CURDIR/../../../ -export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/) +export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/) DIR=$(readlink -f $TESTDIR) diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load index 7899cc09b..cbdf96f6e 100755 --- a/tests/regression/tools/save-load/test_load +++ b/tests/regression/tools/save-load/test_load @@ -9,7 +9,7 @@ TEST_DESC="Load session(s)" CURDIR=$(dirname $0)/ CONFIG_DIR="${CURDIR}/configuration" TESTDIR=$CURDIR/../../../ -export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/config/) +export LTTNG_SESSION_CONFIG_XSD_PATH=$(readlink -m ${TESTDIR}../src/common/) SESSION_NAME="load-42" EVENT_NAME="tp:tptest" diff --git a/tests/regression/tools/trigger/utils/Makefile.am b/tests/regression/tools/trigger/utils/Makefile.am index dd3b0278f..a6a0258d4 100644 --- a/tests/regression/tools/trigger/utils/Makefile.am +++ b/tests/regression/tools/trigger/utils/Makefile.am @@ -13,5 +13,5 @@ notification_client_LDADD = $(LIBLTTNG_CTL) \ register_some_triggers_SOURCES = register-some-triggers.cpp register_some_triggers_LDADD = $(LIBLTTNG_CTL) \ - $(top_builddir)/src/common/filter/libfilter.la \ - $(top_builddir)/src/common/bytecode/libbytecode.la + $(top_builddir)/src/common/libfilter.la \ + $(top_builddir)/src/common/libbytecode.la diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index bcba28fdb..d1b526d30 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -37,10 +37,10 @@ TESTS = \ LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la -LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la -LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la -LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la -LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la +LIBSTRINGUTILS=$(top_builddir)/src/common/libstring-utils.la +LIBFDTRACKER=$(top_builddir)/src/common/libfd-tracker.la +LIBSESSIOND_COMM=$(top_builddir)/src/common/libsessiond-comm.la +LIBRELAYD=$(top_builddir)/src/common/librelayd.la LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la LIBLTTNG_SESSIOND_COMMON=$(top_builddir)/src/bin/lttng-sessiond/liblttng-sessiond-common.la @@ -112,12 +112,12 @@ test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) # compat_poll unit test test_utils_compat_poll_SOURCES = test_utils_compat_poll.cpp test_utils_compat_poll_LDADD = $(LIBTAP) $(DL_LIBS) \ - $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON_GPL) + $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) # compat_pthread unit test test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.cpp test_utils_compat_pthread_LDADD = $(LIBTAP) \ - $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON_GPL) + $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) # expand_path unit test test_utils_expand_path_SOURCES = test_utils_expand_path.cpp diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 2680daae9..8a710fe30 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -682,8 +682,8 @@ function start_lttng_sessiond_opt() LTTNG_BAIL_OUT "*** Kernel too old for session daemon tests ***" fi - diag "export LTTNG_SESSION_CONFIG_XSD_PATH=${DIR}/../src/common/config/" - : "${LTTNG_SESSION_CONFIG_XSD_PATH="${DIR}/../src/common/config/"}" + diag "export LTTNG_SESSION_CONFIG_XSD_PATH=${DIR}/../src/common/" + : "${LTTNG_SESSION_CONFIG_XSD_PATH="${DIR}/../src/common/"}" export LTTNG_SESSION_CONFIG_XSD_PATH if [ -z "$(lttng_pgrep "${SESSIOND_MATCH}")" ]; then -- 2.34.1