From 6c941e8b26fbd6613c96ed65e08290aa21ff33de Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Fri, 12 Nov 2021 06:55:20 -0700 Subject: [PATCH] automake: Don't install testing libraries libcgset and libcgfortesting are libraries that are used by the unit test framework and are not intended to be installed when `make install` is invoked. Delete them from the install path. Closes: https://github.com/libcgroup/libcgroup/issues/62 Reviewed-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- src/Makefile.am | 5 +++++ src/tools/Makefile.am | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 18398e2b..30feb613 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,3 +26,8 @@ libcgroupfortesting_la_LIBADD = -lpthread $(CODE_COVERAGE_LIBS) libcgroupfortesting_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) -DSTATIC= -DUNIT_TEST libcgroupfortesting_la_LDFLAGS = -Wl,--version-script,$(top_srcdir)/tests/gunit/libcgroup_unittest.map \ -version-number $(LIBRARY_VERSION_MAJOR):$(LIBRARY_VERSION_MINOR):$(LIBRARY_VERSION_RELEASE) + +install-exec-hook: + find $(DESTDIR)$(libdir) -type f -name libcgroupfortesting.\* -delete + unlink $(DESTDIR)$(libdir)/libcgroupfortesting.so + unlink $(DESTDIR)$(libdir)/libcgroupfortesting.so.$(LIBRARY_VERSION_MAJOR) diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index 3d6481d1..5e590d62 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -59,5 +59,8 @@ cgsnapshot_CFLAGS = $(CODE_COVERAGE_CFLAGS) install-exec-hook: chmod u+s $(DESTDIR)$(bindir)/cgexec + find $(DESTDIR)$(libdir) -type f -name libcgset.\* -delete + unlink $(DESTDIR)$(libdir)/libcgset.so + unlink $(DESTDIR)$(libdir)/libcgset.so.0 endif -- 2.47.2