[libgames-support] Add API version to include directory and library name



commit 5792592b763290337a841e3164ec2d6906f2d47b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jul 30 21:10:35 2016 -0500

    Add API version to include directory and library name
    
    This should have been done from the start; it was a serious oversight.
    Unfortunately it means all dependent games (gnome-klotski, gnome-robots,
    gnome-nibbles, gnome-mines) will need to be rebuilt. Fortunately no
    changes in the games should be required, as the games all get the
    include directory and library name from pkg-config.
    
    Sneakily rename the include directory location while we're at it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766334

 games/Makefile.am          |   17 +++++++++--------
 libgames-support-1.0.pc.in |    4 ++--
 tests/Makefile.am          |    2 +-
 3 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/games/Makefile.am b/games/Makefile.am
index 6512a4f..d0fb41c 100644
--- a/games/Makefile.am
+++ b/games/Makefile.am
@@ -1,6 +1,6 @@
-lib_LTLIBRARIES = libgames-support.la
+lib_LTLIBRARIES = libgames-support-@LIBGAMES_SUPPORT_API_VERSION@.la
 
-libgames_support_la_SOURCES = \
+libgames_support_@LIBGAMES_SUPPORT_API_VERSION@_la_SOURCES = \
        config.vapi                             \
        gridframe.vala                          \
        scores/category.vala                    \
@@ -11,21 +11,21 @@ libgames_support_la_SOURCES = \
        scores/importer.vala                    \
        scores/score.vala
 
-libgames_support_la_CFLAGS = \
+libgames_support_@LIBGAMES_SUPPORT_API_VERSION@_la_CFLAGS = \
        -w
 
-libgames_support_la_CPPFLAGS = \
+libgames_support_@LIBGAMES_SUPPORT_API_VERSION@_la_CPPFLAGS = \
        -I$(top_srcdir)/include                         \
        -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"        \
        -DLOCALEDIR=\"$(localedir)\"                    \
        $(LIBGAMES_SUPPORT_CFLAGS)
 
-libgames_support_la_LDFLAGS = \
+libgames_support_@LIBGAMES_SUPPORT_API_VERSION@_la_LDFLAGS = \
        -version-info $(LIBGAMES_SUPPORT_LT_VERSION) \
        -no-undefined \
        $(LIBGAMES_SUPPORT_LIBS)
 
-libgames_support_la_VALAFLAGS = \
+libgames_support_@LIBGAMES_SUPPORT_API_VERSION@_la_VALAFLAGS = \
        --pkg glib-2.0                  \
        --pkg gtk+-3.0                  \
        --pkg gio-2.0                   \
@@ -33,9 +33,10 @@ libgames_support_la_VALAFLAGS = \
        --header=libgames-support.h     \
        --vapi=libgames-support-$(LIBGAMES_SUPPORT_API_VERSION).vapi
 
-libgames-support.h libgames-support-$(LIBGAMES_SUPPORT_API_VERSION).vapi: libgames_support_la_vala.stamp
+libgames-support.h libgames-support-$(LIBGAMES_SUPPORT_API_VERSION).vapi: \
+       libgames_support_$(LIBGAMES_SUPPORT_API_VERSION)_la_vala.stamp
 
-games_includedir = $(includedir)/gnome-games
+games_includedir = $(includedir)/games-support-$(LIBGAMES_SUPPORT_API_VERSION)
 dist_games_include_HEADERS = libgames-support.h
 
 vapidir = $(datadir)/vala/vapi
diff --git a/libgames-support-1.0.pc.in b/libgames-support-1.0.pc.in
index 3537a4b..68ba363 100644
--- a/libgames-support-1.0.pc.in
+++ b/libgames-support-1.0.pc.in
@@ -7,5 +7,5 @@ Name: libgames-support
 Description: Useful functionality shared among GNOME games
 Version: @VERSION@
 Requires: gee-0.8 glib-2.0 gio-2.0 gtk+-3.0
-Libs: -L${libdir} -lgames-support
-Cflags: -I${includedir}/gnome-games
+Libs: -L${libdir} -lgames-support-@LIBGAMES_SUPPORT_API_VERSION@
+Cflags: -I${includedir}/games-support-@LIBGAMES_SUPPORT_API_VERSION@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2aa4d46..80f5bfe 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,7 @@ test_scores_CPPFLAGS = \
        $(LIBGAMES_SUPPORT_CFLAGS)
 
 test_scores_LDADD = \
-       $(top_builddir)/games/libgames-support.la       \
+       $(top_builddir)/games/libgames-support-$(LIBGAMES_SUPPORT_API_VERSION).la       \
        $(LIBGAMES_SUPPORT_LIBS)
 
 test_scores_VALAFLAGS = \


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