libvirt: allow separated src and build dirs

Poky commit 69b6eaca3d9b635e8a61a0fdbd814b558e91901d [autotools:
Enable separate builddir by default] enforced separate build
directories, which is supported by automake.  Make some minor updates
to the recipes and upstream source to allow builds to work with
separated src and build directories.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Mark Asselstine 2014-05-07 12:52:29 -04:00 committed by Bruce Ashfield
parent 5b57bf462b
commit 4d8814f0d1
3 changed files with 60 additions and 2 deletions

View File

@ -23,8 +23,8 @@ SRC_URI[libvirt_python.sha256sum] = "94d79d662b6010f6c688b8856b2d95077736d48ffa3
export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
export LIBVIRT_CFLAGS = "-I${S}/include" export LIBVIRT_CFLAGS = "-I${S}/include"
export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl" export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl"
export LDFLAGS="-L${S}/src/.libs" export LDFLAGS="-L${B}/src/.libs"
LIBVIRT_INSTALL_ARGS = "--root=${D} \ LIBVIRT_INSTALL_ARGS = "--root=${D} \
--prefix=${prefix} \ --prefix=${prefix} \

View File

@ -0,0 +1,57 @@
From 884b6e3724b75cd92766d5386455983e3557a286 Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Fri, 2 May 2014 13:45:05 -0400
Subject: [PATCH] tests: allow separated src and build dirs
Fixup Makefile.am to search for static files back in srcdir.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
tests/Makefile.am | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0da514b..b8d7c19 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1006,22 +1006,22 @@ install-ptest:
@(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \
install * $(DEST_DIR)/tools)
install -d $(DEST_DIR)/src/network
- cp ../src/network/*.xml $(DEST_DIR)/src/network
+ cp $(top_srcdir)/src/network/*.xml $(DEST_DIR)/src/network
install -d $(DEST_DIR)/src/cpu
- cp ../src/cpu/*.xml $(DEST_DIR)/src/cpu
+ cp $(top_srcdir)/src/cpu/*.xml $(DEST_DIR)/src/cpu
install ../src/libvirt_iohelper $(DEST_DIR)/src
install -D ../daemon/libvirtd $(DEST_DIR)/daemon/libvirtd
- install -D ../daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
+ install -D $(top_srcdir)/daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
@(if [ -d ../daemon/.libs ] ; then cd ../daemon/.libs; fi; \
install * $(DEST_DIR)/daemon)
install -d $(DEST_DIR)/src/.libs
@(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \
install * $(DEST_DIR)/src/.libs)
install -d $(DEST_DIR)/docs/schemas
- cp ../docs/schemas/*.rng $(DEST_DIR)/docs/schemas
- cp -r ../build-aux $(DEST_DIR)
+ cp $(top_srcdir)/docs/schemas/*.rng $(DEST_DIR)/docs/schemas
+ cp -r $(top_srcdir)/build-aux $(DEST_DIR)
install -d $(DEST_DIR)/examples/xml
- cp -r ../examples/xml/test $(DEST_DIR)/examples/xml
+ cp -r $(top_srcdir)/examples/xml/test $(DEST_DIR)/examples/xml
install -d $(DEST_DIR)/tests/.libs
find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \;
find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \;
@@ -1029,7 +1029,7 @@ install-ptest:
if [ -f .libs/$$file ]; then \
install .libs/$$file $(DEST_DIR)/tests; \
else \
- install $$file $(DEST_DIR)/tests; \
+ install $(srcdir)/$$file $(DEST_DIR)/tests; \
fi; \
done;)
@(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;)
--
1.8.3.2

View File

@ -29,6 +29,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \
file://libvirtd.conf \ file://libvirtd.conf \
file://runptest.patch \ file://runptest.patch \
file://run-ptest \ file://run-ptest \
file://tests-allow-separated-src-and-build-dirs.patch \
" "
SRC_URI[libvirt.md5sum] = "592958ad1ddce7574d8cb0a31e635acd" SRC_URI[libvirt.md5sum] = "592958ad1ddce7574d8cb0a31e635acd"