spice-common/tests/Makefile.am
Marc-André Lureau 78cab12336 Revert "Remove files moved to spice-protocol"
This reverts commit 7665dcf1bb.

Also revert the related build-sys changes to fix the build.

codegen generated code depends on spice-common code (marshaller,
messages etc), it makes more sense to keep the generator along
this. Otherwise a newer protocol release will fail to build older
projects.

*.proto files are required as well, since it generates code that parent
modules depend on unconditionnaly.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-04-14 14:33:50 +02:00

52 lines
1.6 KiB
Makefile

NULL =
TESTS = test_marshallers
check_PROGRAMS = test_marshallers
test_marshallers_SOURCES = \
generated_test_marshallers.c \
generated_test_marshallers.h \
test-marshallers.c \
test-marshallers.h \
$(NULL)
test_marshallers_CFLAGS = \
-I$(top_srcdir) \
$(GLIB2_CFLAGS) \
$(PROTOCOL_CFLAGS) \
$(NULL)
test_marshallers_LDADD = \
$(top_builddir)/common/libspice-common.la \
$(GLIB2_LIBS) \
$(NULL)
# Avoid need for python(pyparsing) by end users
TEST_MARSHALLERS = \
generated_test_marshallers.c \
generated_test_marshallers.h \
$(NULL)
BUILT_SOURCES = $(TEST_MARSHALLERS)
MARSHALLERS_DEPS = \
$(top_srcdir)/python_modules/__init__.py \
$(top_srcdir)/python_modules/codegen.py \
$(top_srcdir)/python_modules/demarshal.py \
$(top_srcdir)/python_modules/marshal.py \
$(top_srcdir)/python_modules/ptypes.py \
$(top_srcdir)/python_modules/spice_parser.py \
$(top_srcdir)/spice_codegen.py \
$(NULL)
# Note despite being autogenerated these are not part of CLEANFILES, they are
# actually a part of EXTRA_DIST, to avoid the need for pyparser by end users
generated_test_marshallers.c: $(srcdir)/test-marshallers.proto $(MARSHALLERS_DEPS)
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers --server --include test-marshallers.h $< $@ >/dev/null
generated_test_marshallers.h: $(srcdir)/test-marshallers.proto $(MARSHALLERS_DEPS)
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers --server --include test-marshallers.h -H $< $@ >/dev/null
EXTRA_DIST = \
$(TEST_MARSHALLERS) \
test-marshallers.proto \
$(NULL)
-include $(top_srcdir)/git.mk