[Spice-devel] [PATCH spice-gtk] build: Move spice-common to subprojects/ directory

Jonathon Jongsma jjongsma at redhat.com
Wed Aug 1 16:49:12 UTC 2018


Seems fine

Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Wed, 2018-08-01 at 12:08 -0300, Eduardo Lima (Etrunko) wrote:
> The reason for this commit is that Meson expects all submodules to be
> placed in this subdirectory, and since autotools build is more
> flexible
> in this case, we make some small adjustments to configure.ac and
> Makefile.am files to accommodate for this change.
> 
> The same has been done for spice-server in commit b0e141b3
> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  .gitmodules                              | 2 +-
>  Makefile.am                              | 2 +-
>  configure.ac                             | 9 ++++++---
>  po/POTFILES.skip                         | 4 ++--
>  src/Makefile.am                          | 4 ++--
>  spice-common => subprojects/spice-common | 0
>  6 files changed, 12 insertions(+), 9 deletions(-)
>  rename spice-common => subprojects/spice-common (100%)
> 
> diff --git a/.gitmodules b/.gitmodules
> index 3884a75..6938cd0 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,5 +1,5 @@
>  [submodule "spice-common"]
> -	path = spice-common
> +	path = subprojects/spice-common
>  	url = ../spice-common.git
>  [submodule "src/keycodemapdb"]
>  	path = src/keycodemapdb
> diff --git a/Makefile.am b/Makefile.am
> index 8c000fd..875c25c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,7 +1,7 @@
>  ACLOCAL_AMFLAGS = -I m4
>  NULL =
>  
> -SUBDIRS = spice-common src man po doc data tools
> +SUBDIRS = subprojects/spice-common src man po doc data tools
>  
>  if BUILD_TESTS
>  SUBDIRS += tests
> diff --git a/configure.ac b/configure.ac
> index 6ddfa4b..7b32e29 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -4,7 +4,7 @@ AC_INIT([spice-gtk], [m4_esyscmd(build-aux/git-
> version-gen .tarball-version)],
>          [spice-devel at lists.freedesktop.org])
>  
>  AC_CONFIG_MACRO_DIR([m4])
> -m4_include([spice-common/m4/spice-deps.m4])
> +m4_include([subprojects/spice-common/m4/spice-deps.m4])
>  AC_CONFIG_HEADER([config.h])
>  AC_CONFIG_AUX_DIR([build-aux])
>  
> @@ -85,12 +85,15 @@ AS_IF([test "$have_egl" = "yes"],
>  AC_CHECK_LIBM
>  AC_SUBST(LIBM)
>  
> -AC_CONFIG_SUBDIRS([spice-common])
> +AC_CONFIG_SUBDIRS([subprojects/spice-common])
>  PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.12.15])
>  
> -COMMON_CFLAGS='-I${top_builddir}/spice-common/
> -I${top_srcdir}/spice-common/ ${SPICE_PROTOCOL_CFLAGS}'
> +COMMON_CFLAGS='-I${top_builddir}/subprojects/spice-common/
> -I${top_srcdir}/subprojects/spice-common/ ${SPICE_PROTOCOL_CFLAGS}'
>  AC_SUBST(COMMON_CFLAGS)
>  
> +SPICE_COMMON_DIR='${top_builddir}/subprojects/spice-common'
> +AC_SUBST(SPICE_COMMON_DIR)
> +
>  SPICE_GTK_MAJOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f1`
>  SPICE_GTK_MINOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f2`
>  SPICE_GTK_MICRO_VERSION=`echo $PACKAGE_VERSION | cut -d. -f3 | cut
> -d- -f1`
> diff --git a/po/POTFILES.skip b/po/POTFILES.skip
> index 0dd1912..8840875 100644
> --- a/po/POTFILES.skip
> +++ b/po/POTFILES.skip
> @@ -1,2 +1,2 @@
> -spice-common/python_modules/spice_parser.py
> -spice-common/spice_codegen.py
> +subprojects/spice-common/python_modules/spice_parser.py
> +subprojects/spice-common/spice_codegen.py
> diff --git a/src/Makefile.am b/src/Makefile.am
> index e719ff6..afad922 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -174,8 +174,8 @@ libspice_client_glib_2_0_la_LDFLAGS =	\
>  	$(NULL)
>  
>  libspice_client_glib_2_0_la_LIBADD =					
> \
> -	$(top_builddir)/spice-common/common/libspice-common.la	
> 	\
> -	$(top_builddir)/spice-common/common/libspice-common-
> client.la	\
> +	$(SPICE_COMMON_DIR)/common/libspice-common.la		
> 	\
> +	$(SPICE_COMMON_DIR)/common/libspice-common-client.la		
> \
>  	$(GLIB2_LIBS)						
> 	\
>  	$(SOUP_LIBS)							
> \
>  	$(GIO_LIBS)							
> \
> diff --git a/spice-common b/subprojects/spice-common
> similarity index 100%
> rename from spice-common
> rename to subprojects/spice-common


More information about the Spice-devel mailing list