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)
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)
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