[Spice-devel] [spice-server] build: Rebuild shared library when symbol file changes

Christophe Fergeau cfergeau at redhat.com
Thu Dec 7 17:03:45 UTC 2017


On Thu, Dec 07, 2017 at 11:19:18AM -0500, Frediano Ziglio wrote:
> > 
> > At the moment, changing spice-server.syms to add/remove a new symbol to
> > be exported does not regenerate spice-server.so. This commit added the
> > needed dependency for this to work.
> > 
> > Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
> > ---
> >  server/Makefile.am | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/server/Makefile.am b/server/Makefile.am
> > index 20f0f1925..f64cd6062 100644
> > --- a/server/Makefile.am
> > +++ b/server/Makefile.am
> > @@ -36,6 +36,7 @@ libspice_server_la_LDFLAGS =			\
> >  if HAVE_LD_VERSION_SCRIPT
> >  libspice_server_la_LDFLAGS += \
> >  	-Wl,--version-script=$(top_srcdir)/server/spice-server.syms
> > +EXTRA_libspice_server_la_DEPENDENCIES =
> > $(top_srcdir)/server/spice-server.syms
> >  endif
> >  
> >  libserver_la_LIBADD =							\
> 
> Didn't test but looks ok.
> Why you didn't use $(srcdir)/spice-server.syms instead of $(top_srcdir)/server/spice-server.syms ?

I copied and pasted what is on the libspice_server_la_LDFLAGS line :)

I'll push this as a followup:

commit 1ad7f1f4b8498ea0f98bc145576a8ea57d1c74c7 (HEAD -> tls)
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Thu Dec 7 18:01:58 2017 +0100

    build: Use $(srcdir) when it makes sense
    
    There are a few places which use $(top_srcdir) when $(srcdir) would be
    equally valid.

diff --git a/server/Makefile.am b/server/Makefile.am
index f64cd6062..cfd6ae841 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -35,8 +35,8 @@ libspice_server_la_LDFLAGS =                  \
 
 if HAVE_LD_VERSION_SCRIPT
 libspice_server_la_LDFLAGS += \
-       -Wl,--version-script=$(top_srcdir)/server/spice-server.syms
-EXTRA_libspice_server_la_DEPENDENCIES = $(top_srcdir)/server/spice-server.syms
+       -Wl,--version-script=$(srcdir)/spice-server.syms
+EXTRA_libspice_server_la_DEPENDENCIES = $(srcdir)/spice-server.syms
 endif
 
 libserver_la_LIBADD =                                                  \
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 971575b5a..ad55eb760 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -1,7 +1,7 @@
 NULL =
 
 @VALGRIND_CHECK_RULES@
-VALGRIND_SUPPRESSIONS_FILES = $(top_srcdir)/server/tests/valgrind/glib.supp
+VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/valgrind/glib.supp
 EXTRA_DIST =                           \
        $(VALGRIND_SUPPRESSIONS_FILES)  \
        pki/ca-cert.pem                 \

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171207/27b499a2/attachment.sig>


More information about the Spice-devel mailing list