summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/Makefile.am13
-rw-r--r--configure.ac1
2 files changed, 12 insertions, 2 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index 55bc0f82..ab80bfbd 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -1,8 +1,13 @@
NULL =
-SUBDIRS = $(red_target)
+SUBDIRS = . $(red_target)
DIST_SUBDIRS = x11 #windows
+spice_built_sources = generated_demarshallers.cpp
+
+generated_demarshallers.cpp: $(top_srcdir)/spice.proto
+ $(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include common.h $(top_srcdir)/spice.proto generated_demarshallers.cpp
+
RED_COMMON_SRCS = \
application.cpp \
application.h \
@@ -90,4 +95,8 @@ RED_COMMON_SRCS = \
utils.h \
$(NULL)
-EXTRA_DIST = $(RED_COMMON_SRCS)
+MAINTAINERCLEANFILES = $(spice_built_sources)
+
+EXTRA_DIST = $(RED_COMMON_SRCS) $(spice_built_sources)
+
+BUILT_SOURCES = $(spice_built_sources)
diff --git a/configure.ac b/configure.ac
index 08804bf6..3114a1ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ AC_CANONICAL_HOST
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
AC_C_BIGENDIAN
+AC_PATH_PROGS(PYTHON, python2 python)
SPICE_LT_VERSION=m4_format("%d:%d:%d", 1, 0, 0)
AC_SUBST(SPICE_LT_VERSION)