]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
automake: Don't install testing libraries
authorTom Hromatka <tom.hromatka@oracle.com>
Fri, 12 Nov 2021 13:56:37 +0000 (06:56 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 12 Nov 2021 13:56:37 +0000 (06:56 -0700)
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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 6c941e8b26fbd6613c96ed65e08290aa21ff33de)

src/Makefile.am
src/tools/Makefile.am

index 18398e2b336763700218f48c1ac625f91ed51872..30feb6135f5fba4cf8cf40a21d35c30da0306456 100644 (file)
@@ -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)
index 66a6b66ab0df452b4547a9c220b7a18b38ac3f15..bf76157373ca0d453f634f468d65b1f312ea4baa 100644 (file)
@@ -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