build: installcheck: Ensure libguestfs.so is copied.

If you ran 'make installcheck' when libguestfs-devel was not
installed, then the installcheck would fail in many places with:

  gcc: error: ../../src/.libs/libguestfs.so: No such file or directory

We should stop the installcheck script immediately if the .so file was
not found.

Also this commit ensures that src/.libs/libguestfs.so* not existing
before installcheck is not fatal.
This commit is contained in:
Richard W.M. Jones
2016-02-19 12:46:22 +00:00
parent 2e87face9e
commit 3fa03a30b3

View File

@@ -35,8 +35,10 @@ exec_prefix=@exec_prefix@
find -name 'lt-*' | grep '/.libs/lt-' | xargs -r rm
# Copy the installed library into libtool directory.
rm src/.libs/libguestfs.so*
cp @libdir@/libguestfs.so* src/.libs/
rm -f src/.libs/libguestfs.so*
cp @libdir@/libguestfs.so src/.libs/
cp @libdir@/libguestfs.so.0 src/.libs/
cp @libdir@/libguestfs.so.0.* src/.libs/
# Copy installed binaries into the right places.
cp @bindir@/libguestfs-test-tool test-tool/