Re: [PATCH v2 12/43] Generate some definition for dissector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 08, 2015 at 02:53:45PM +0100, Frediano Ziglio wrote:
> Generate global definitions.
> Generate function to registers various dissector components.
> For the moment the field array is empty bu we save some global to
> be able to register new ones.
> Add a base test for generated dissector.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  Makefile.am                 |  2 +-
>  codegen/Makefile.am         | 40 +++++++++++++++++++++
>  codegen/dissector_test.c    | 81 +++++++++++++++++++++++++++++++++++++++++
>  configure.ac                |  2 ++
>  python_modules/dissector.py | 87 +++++++++++++++++++++++++++++++++++++++++++--
>  spice_codegen.py            |  2 +-
>  6 files changed, 209 insertions(+), 5 deletions(-)
>  create mode 100644 codegen/Makefile.am
>  create mode 100644 codegen/dissector_test.c
> 
> diff --git a/Makefile.am b/Makefile.am
> index 380bf24..382a0ea 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,7 +1,7 @@
>  NULL =
>  ACLOCAL_AMFLAGS = -I m4
>  
> -SUBDIRS = python_modules common
> +SUBDIRS = python_modules common codegen
>  DIST_SUBDIRS = spice-protocol $(SUBDIRS)
>  
>  EXTRA_DIST =				\
> diff --git a/codegen/Makefile.am b/codegen/Makefile.am
> new file mode 100644
> index 0000000..129543c
> --- /dev/null
> +++ b/codegen/Makefile.am
> @@ -0,0 +1,40 @@
> +NULL =
> +
> +AM_CPPFLAGS =				\
> +	-I$(top_srcdir)			\
> +	$(WIRESHARK_CFLAGS)			\
> +	$(SPICE_COMMON_CFLAGS)		\
> +	$(NULL)
> +
> +dissector_test_LDADD =				\
> +	$(SPICE_COMMON_LIBS)				\
> +	$(NULL)
> +
> +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)/python_modules/dissector.py	\
> +	$(top_srcdir)/spice_codegen.py			\
> +	$(NULL)
> +
> +test.o: test.h

This test.o dep (and the similar one in another commit) is odd. Missing
BUILT_SOURCES?

> +
> +test.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
> +	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-dissector --client $< $@ >/dev/null
> +
> +test.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
> +	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-dissector --client $< --header $@ >/dev/null
> +
> +TESTS = dissector_test
> +check_PROGRAMS = dissector_test
> +
> +dissector_test_SOURCES = dissector_test.c test.c test.h
> +
> +EXTRA_DIST =				\
> +	$(NULL)
> +
> +-include $(top_srcdir)/git.mk


> diff --git a/configure.ac b/configure.ac
> index 4287f92..a156cae 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -38,6 +38,7 @@ SPICE_CHECK_PIXMAN(SPICE_COMMON)
>  SPICE_CHECK_SMARTCARD(SPICE_COMMON)
>  SPICE_CHECK_CELT051(SPICE_COMMON)
>  SPICE_CHECK_GLIB2(SPICE_COMMON)
> +PKG_CHECK_MODULES(WIRESHARK, wireshark)

This should be optional.

Christophe

Attachment: pgpo3pcrAAgM3.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]