[Spice-devel] [PATCH spice-gtk 1/3] gtk/Makefile.am: Don't include auto-generated files into make dist tarbal

Hans de Goede hdegoede at redhat.com
Fri Sep 2 02:35:16 PDT 2011


We have various files which are auto-generated which currently get included
into the tarbal, yet they are part of CLEANFILES, so the first make clean
removes them, which is rather weird. Use nodist_foo_SOURCES to make them
not end up in the tarbal.

Except for generated_[de]marshallers[1].c, as autogenerating those on
end user builds would mean requiring the end user to have pyparser installed,
so instead remove them from CLEANFILES.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 gtk/Makefile.am |   39 +++++++++++++++++++++++++++++----------
 1 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 6759d45..43b9f79 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -101,14 +101,16 @@ SPICE_GTK_SOURCES_COMMON =		\
 	spice-widget.c			\
 	spice-widget.h			\
 	spice-widget-priv.h		\
-	spice-widget-enums.c		\
-	spice-widget-enums.h		\
 	vncdisplaykeymap.c		\
 	vncdisplaykeymap.h		\
 	spice-grabsequence.c		\
 	spice-grabsequence.h		\
 	$(NULL)
 
+nodist_SPICE_GTK_SOURCES_COMMON =	\
+	spice-widget-enums.c		\
+	$(NULL)
+
 if WITH_X11
 SPICE_GTK_SOURCES_COMMON +=		\
 	spice-widget-x11.c		\
@@ -123,20 +125,25 @@ if HAVE_GTK_2
 libspice_client_gtk_2_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
 libspice_client_gtk_2_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
 libspice_client_gtk_2_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
+nodist_libspice_client_gtk_2_0_la_SOURCES = $(nodist_SPICE_GTK_SOURCES_COMMON)
 else
 libspice_client_gtk_3_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
 libspice_client_gtk_3_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
 libspice_client_gtk_3_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
+nodist_libspice_client_gtk_3_0_la_SOURCES = $(nodist_SPICE_GTK_SOURCES_COMMON)
 endif
 
 
 libspice_client_gtkincludedir = $(includedir)/spice-client-gtk-$(SPICE_GTK_API_VERSION)
 libspice_client_gtkinclude_HEADERS =	\
 	spice-widget.h			\
-	spice-widget-enums.h		\
 	spice-grabsequence.h		\
 	$(NULL)
 
+nodist_libspice_client_gtkinclude_HEADERS =	\
+	spice-widget-enums.h		\
+	$(NULL)
+
 libspice_client_glib_2_0_la_LDFLAGS =	\
 	-version-info 4:0:3		\
 	-no-undefined			\
@@ -193,10 +200,7 @@ libspice_client_glib_2_0_la_SOURCES =	\
 	spice-session-priv.h		\
 	spice-channel.c			\
 	spice-channel-cache.h		\
-	spice-glib-enums.c		\
 	spice-channel-priv.h		\
-	spice-marshal.c			\
-	spice-marshal.h			\
 	generated_demarshallers.c	\
 	generated_demarshallers1.c	\
 	generated_marshallers.c		\
@@ -252,6 +256,12 @@ libspice_client_glib_2_0_la_SOURCES =	\
 	$(COMMON_DIR)/ssl_verify.h	\
 	$(NULL)
 
+nodist_libspice_client_glib_2_0_la_SOURCES =	\
+	spice-glib-enums.c		\
+	spice-marshal.c			\
+	spice-marshal.h			\
+	$(NULL)
+
 libspice_client_glibincludedir = $(includedir)/spice-client-glib-2.0
 libspice_client_glibinclude_HEADERS =	\
 	spice-audio.h			\
@@ -259,7 +269,6 @@ libspice_client_glibinclude_HEADERS =	\
 	spice-types.h			\
 	spice-session.h			\
 	spice-channel.h			\
-	spice-glib-enums.h		\
 	spice-util.h			\
 	spice-option.h			\
 	channel-cursor.h		\
@@ -273,6 +282,10 @@ libspice_client_glibinclude_HEADERS =	\
 	usb-device-manager.h		\
 	$(NULL)
 
+nodist_libspice_client_glibinclude_HEADERS =	\
+	spice-glib-enums.h		\
+	$(NULL)
+
 # file for API compatibility, but we don't want warning during our compilation
 dist_libspice_client_glibinclude_DATA =	\
 	spice-channel-enums.h		\
@@ -430,6 +443,10 @@ spice-widget-enums.h: spice-widget.h
 		$< >  $@
 
 
+# Note despite being autogenerated these are not part of CLEANFILES, and part
+# of libspice_client_glib_2_0_la_SOURCES rather then
+# nodist_libspice_client_glib_2_0_la_SOURCES, to avoid the need for pyparser
+# by end users
 generated_demarshallers.c: $(top_srcdir)/spice.proto
 	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@ >/dev/null
 
@@ -446,6 +463,9 @@ vncdisplaykeymap.c: $(KEYMAPS)
 
 $(KEYMAPS): $(KEYMAP_GEN) keymaps.csv
 
+# Note despite being autogenerated these are not part of CLEANFILES, they
+# are actually a part of EXTRA_DIST to avoid the need for perl(Text::CSV) by
+# end users
 vncdisplaykeymap_xorgevdev2xtkbd.c:
 	$(AM_V_GEN)$(KEYMAP_GEN) $(srcdir)/keymaps.csv xorgevdev xtkbd > $@ || rm $@
 
@@ -465,8 +485,6 @@ vncdisplaykeymap_win322xtkbd.c:
 	$(AM_V_GEN)$(KEYMAP_GEN) $(srcdir)/keymaps.csv win32 xtkbd > $@ || rm $@
 
 CLEANFILES = spice-marshal.c spice-marshal.h \
-	generated_demarshallers.c generated_demarshallers1.c \
-	generated_marshallers.c generated_marshallers1.c \
 	spice-glib-enums.c spice-glib-enums.h \
 	spice-widget-enums.c spice-widget-enums.h
 MAINTAINERCLEANFILES = $(KEYMAPS)
@@ -479,7 +497,8 @@ pyexec_LTLIBRARIES = SpiceClientGtk.la
 SpiceClientGtk_la_LIBADD = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la $(PYGTK_LIBS)
 SpiceClientGtk_la_CFLAGS = $(GTK_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS)
 SpiceClientGtk_la_LDFLAGS = -module -avoid-version -fPIC
-SpiceClientGtk_la_SOURCES = spice-client-gtk-module.c spice-client-gtk-module.defs.c
+SpiceClientGtk_la_SOURCES = spice-client-gtk-module.c
+nodist_SpiceClientGtk_la_SOURCES = spice-client-gtk-module.defs.c
 
 CODEGENDIR = `pkg-config --variable=codegendir pygtk-2.0`
 DEFSDIR = `pkg-config --variable=defsdir pygtk-2.0`
-- 
1.7.6.1



More information about the Spice-devel mailing list