[Spice-devel] [PATCH spice-gtk 1/4] build-sys: add extra dependencies on symbols files

Marc-André Lureau marcandre.lureau at gmail.com
Tue Oct 28 13:32:22 PDT 2014


Whenever the symbols files are modified, rebuild the library.
---
 gtk/Makefile.am | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 3d87958..1430354 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -60,11 +60,15 @@ lib_LTLIBRARIES += libspice-client-gtk-3.0.la
 endif
 
 if HAVE_LD_VERSION_SCRIPT
-GLIB_VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
-GTK_VERSION_LDFLAGS = $(GLIB_VERSION_LDFLAGS)
+GLIB_SYMBOLS_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
+GLIB_SYMBOLS_FILE = map-file
+GTK_SYMBOLS_LDFLAGS = $(GLIB_SYMBOLS_LDFLAGS)
+GTK_SYMBOLS_FILE = $(GLIB_SYMBOLS_FILE)
 else
-GLIB_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-glib-sym-file
-GTK_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-gtk-sym-file
+GLIB_SYMBOLS_LDFLAGS = -export-symbols ${srcdir}/spice-glib-sym-file
+GLIB_SYMBOLS_FILE = spice-glib-sym-file
+GTK_SYMBOLS_LDFLAGS = -export-symbols ${srcdir}/spice-gtk-sym-file
+GTK_SYMBOLS_FILE = spice-gtk-sym-file
 endif
 
 KEYMAP_GEN = $(srcdir)/keymap-gen.pl
@@ -107,7 +111,7 @@ AM_CPPFLAGS =					\
 SPICE_GTK_LDFLAGS_COMMON =		\
 	-version-info 4:0:0		\
 	-no-undefined			\
-	$(GTK_VERSION_LDFLAGS)		\
+	$(GTK_SYMBOLS_LDFLAGS)		\
 	$(NULL)
 
 SPICE_GTK_LIBADD_COMMON =		\
@@ -153,11 +157,13 @@ SPICE_GTK_SOURCES_COMMON +=		\
 endif
 
 if HAVE_GTK_2
+libspice_client_gtk_2_0_la_DEPEDENCIES = $(GTK_SYMBOLS_FILE)
 libspice_client_gtk_2_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
 libspice_client_gtk_2_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
 libspice_client_gtk_2_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
 nodist_libspice_client_gtk_2_0_la_SOURCES = $(nodist_SPICE_GTK_SOURCES_COMMON)
 else
+libspice_client_gtk_3_0_la_DEPEDENCIES = $(GTK_SYMBOLS_FILE)
 libspice_client_gtk_3_0_la_LDFLAGS = $(SPICE_GTK_LDFLAGS_COMMON)
 libspice_client_gtk_3_0_la_LIBADD = $(SPICE_GTK_LIBADD_COMMON)
 libspice_client_gtk_3_0_la_SOURCES = $(SPICE_GTK_SOURCES_COMMON)
@@ -177,10 +183,12 @@ nodist_libspice_client_gtkinclude_HEADERS =	\
 	spice-widget-enums.h			\
 	$(NULL)
 
+libspice_client_glib_2_0_la_DEPENDENCIES = $(GLIB_SYMBOLS_FILE)
+
 libspice_client_glib_2_0_la_LDFLAGS =	\
 	-version-info 13:0:5		\
 	-no-undefined			\
-	$(GLIB_VERSION_LDFLAGS)		\
+	$(GLIB_SYMBOLS_LDFLAGS)		\
 	$(NULL)
 
 libspice_client_glib_2_0_la_LIBADD =					\
-- 
1.9.3



More information about the Spice-devel mailing list