From: Tom Hromatka Date: Fri, 12 Nov 2021 13:56:37 +0000 (-0700) Subject: automake: Don't install testing libraries X-Git-Tag: v2.0.1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86895e34e6253508d6856f6f28c52240e8a885ed;p=thirdparty%2Flibcgroup.git 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 (cherry picked from commit 6c941e8b26fbd6613c96ed65e08290aa21ff33de) --- 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 66a6b66a..bf761573 100644 --- a/src/tools/Makefile.am +++ b/src/tools/Makefile.am @@ -63,5 +63,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