From: Tom Hromatka Date: Fri, 12 Nov 2021 13:55:20 +0000 (-0700) Subject: automake: Don't install testing libraries X-Git-Tag: v3.0~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c941e8b26fbd6613c96ed65e08290aa21ff33de;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 --- 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