[Spice-devel] [PATCH spice-xpi 2/5] build: use spice-protocol as a submodule

Marc-André Lureau marcandre.lureau at gmail.com
Fri Feb 24 06:20:22 PST 2012


---
 .gitmodules    |    3 +++
 Makefile.am    |    1 +
 autogen.sh     |    3 +++
 configure.ac   |    3 ++-
 spice-protocol |    1 +
 5 files changed, 10 insertions(+), 1 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 spice-protocol

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..14b3beb
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "spice-protocol"]
+	path = spice-protocol
+	url = ./spice-protocol
diff --git a/Makefile.am b/Makefile.am
index b811df8..934f055 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = SpiceXPI data
+DIST_SUBDIRS = spice-protocol $(SUBDIRS)
 
 EXTRA_DIST = \
     m4
diff --git a/autogen.sh b/autogen.sh
index e5a152d..1932e04 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,6 +6,9 @@ test -z "$srcdir" && srcdir=.
 
 mkdir -p "$srcdir"/m4
 
+git submodule init
+git submodule update
+
 autoreconf -vfi "$srcdir"
 
 if [ -z "$NOCONFIGURE" ]; then
diff --git a/configure.ac b/configure.ac
index eefb354..4c0f201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,8 @@ PKG_CHECK_MODULES(LOG4CPP, log4cpp)
 AC_SUBST(LOG4CPP_CFLAGS)
 AC_SUBST(LOG4CPP_LIBS)
 
-PKG_CHECK_MODULES(SPICE_PROTOCOL, spice-protocol >= 0.10.2)
+AC_CONFIG_SUBDIRS([spice-protocol])
+SPICE_PROTOCOL_CFLAGS='-I ${top_srcdir}/spice-protocol'
 AC_SUBST(SPICE_PROTOCOL_CFLAGS)
 
 # The explicit nspr dep is needed because libxul-embedding
diff --git a/spice-protocol b/spice-protocol
new file mode 160000
index 0000000..d5edafd
--- /dev/null
+++ b/spice-protocol
@@ -0,0 +1 @@
+Subproject commit d5edafd28ab762b1b5f663aec449d3e3743f1184
-- 
1.7.7.6



More information about the Spice-devel mailing list