Re: [PATCH spice 03/18] build-sys: build a noinst libtest.la to link to

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

 



> 
> Group the test utility in a library, to avoid repeating the same
> sources.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> ---
>  server/tests/Makefile.am | 25 ++++++++++---------------
>  1 file changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
> index d0bd5a0..52cdf87 100644
> --- a/server/tests/Makefile.am
> +++ b/server/tests/Makefile.am
> @@ -18,7 +18,16 @@ if HAVE_AUTOMATED_TESTS
>  AM_CPPFLAGS += -DAUTOMATED_TESTS
>  endif
>  
> +noinst_LTLIBRARIES = libtest.la
> +
> +libtest_la_SOURCES =				\
> +	basic_event_loop.c			\
> +	basic_event_loop.h			\
> +	test_util.h				\
> +	$(NULL)
> +

You are linking a convenience library to programs, you
should use noinst_LIBRARIES instead of noinst_LTLIBRARIES.

>  LDADD =								\
> +	libtest.la						\
>  	$(GLIB2_LIBS)						\
>  	$(top_builddir)/spice-common/common/libspice-common.la	\
>  	$(top_builddir)/server/libspice-server.la		\
> @@ -26,12 +35,6 @@ LDADD =								\
>  	$(SPICE_NONPKGCONFIG_LIBS)		                \
>  	$(NULL)
>  
> -COMMON_BASE =					\
> -	basic_event_loop.c			\
> -	basic_event_loop.h			\
> -	test_util.h				\
> -	$(NULL)
> -
>  noinst_PROGRAMS =				\
>  	test_display_no_ssl			\
>  	test_display_streaming			\
> @@ -61,40 +64,34 @@ noinst_LIBRARIES = \
>  	$(NULL)
>  
>  test_vdagent_SOURCES =		\
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_vdagent.c		\
>  	$(NULL)
>  
>  test_display_streaming_SOURCES =		\
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_display_streaming.c		\
>  	$(NULL)
>  
>  test_display_no_ssl_SOURCES =			\
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_display_no_ssl.c 			\
>  	$(NULL)
>  
>  test_display_resolution_changes_SOURCES = \
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_display_resolution_changes.c	\
>  	$(NULL)
>  
>  test_just_sockets_no_ssl_SOURCES =		\
> -	$(COMMON_BASE)				\
>  	test_just_sockets_no_ssl.c		\
>  	$(NULL)
>  
>  test_playback_SOURCES =				\
> -	$(COMMON_BASE)				\
>  	test_playback.c				\
>  	$(NULL)
>  
> @@ -107,23 +104,21 @@ test_fail_on_null_core_interface_SOURCES =	\
>  	$(NULL)
>  
>  test_two_servers_SOURCES =			\
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_two_servers.c 			\
>  	$(NULL)
>  
>  test_display_width_stride_SOURCES =		\
> -	$(COMMON_BASE)				\
>  	test_display_base.c			\
>  	test_display_base.h			\
>  	test_display_width_stride.c 		\
>  	$(NULL)
>  
>  spice_server_replay_SOURCES = 			\
> -	$(COMMON_BASE)				\
>  	replay.c				\
>  	test_display_base.h			\
> +	test_util.h				\
>  	$(NULL)
>  
>  stat_test_SOURCES = stat-main.c

Frediano
_______________________________________________
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]