[Spice-devel] [PATCH spice-xpi 3/5] build: fix out-of-tree build

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jan 27 06:45:12 PST 2012


Fix out of tree build, and some minor clean-up.
---
 SpiceXPI/Makefile.am            |   13 ++++---------
 SpiceXPI/src/plugin/Makefile.am |    2 ++
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/SpiceXPI/Makefile.am b/SpiceXPI/Makefile.am
index 9f0ad0b..5cef195 100644
--- a/SpiceXPI/Makefile.am
+++ b/SpiceXPI/Makefile.am
@@ -3,13 +3,8 @@ SUBDIRS=src
 XPI=SpiceXPI.xpi
 
 EXTRA_DIST = logger.ini
-sharedir=/usr/share/spice
-share_DATA = \
-    logger.ini  \
-    $(NULL)
-
-logger.ini :
-	echo do nothing
+spicedatadir = $(datadir)/spice
+spicedata_DATA = logger.ini
 
 DISTDIR=dist
 ZIP=zip
@@ -19,10 +14,10 @@ all-local: SpiceXPI.xpi
 CLEANFILES = SpiceXPI.xpi
 
 SpiceXPI.xpi: $(top_builddir)/SpiceXPI/src/install.rdf $(top_builddir)/SpiceXPI/src/plugin/nsISpicec.xpt $(top_builddir)/SpiceXPI/src/plugin/.libs/libnsISpicec.so
-	rm -rf dist
+	rm -rf $(DISTDIR)
 	@[ -d $(DISTDIR)/plugins ] || mkdir -p $(DISTDIR)/plugins
 	cp $(top_srcdir)/SpiceXPI/src/install.rdf $(DISTDIR)
-	cp $(top_srcdir)/SpiceXPI/src/plugin/*.xpt $(DISTDIR)/plugins
+	cp $(top_builddir)/SpiceXPI/src/plugin/*.xpt $(DISTDIR)/plugins
 	cp $(top_builddir)/SpiceXPI/src/plugin/.libs/libnsISpicec.so* $(DISTDIR)/plugins/nsISpicec.so
 	cp $(top_srcdir)/SpiceXPI/logger.ini $(DISTDIR)/plugins/logger.ini
 	(cd $(DISTDIR); $(ZIP) -r ../$(XPI) .)
diff --git a/SpiceXPI/src/plugin/Makefile.am b/SpiceXPI/src/plugin/Makefile.am
index c6ba8f0..b2c83ab 100644
--- a/SpiceXPI/src/plugin/Makefile.am
+++ b/SpiceXPI/src/plugin/Makefile.am
@@ -81,3 +81,5 @@ BUILT_SOURCES =					\
 	nsISpicec.xpt				\
 	$(NULL)
 
+distclean-local:
+	rm -f $(BUILT_SOURCES)
-- 
1.7.7.6



More information about the Spice-devel mailing list