[PATCH v3] build: Fixed gir build rules



Updated gir build rules so that they depend on the current version,
instead of "0_1".

For that, variables storing the major, minor and micro version have been created.
grl_version, MAJORMINOR and MAJORMINOR_NORM are generated using those vars.
---
 configure.ac    |    9 +++++++--
 src/Makefile.am |    8 ++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0b3416f..fd913aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,8 +6,11 @@
 # Copyright (C) 2010 Igalia S.L.. All rights reserved.
 
 m4_define([prj_name],    [grilo])
-m4_define([prj_version], [0.1.6])
 m4_define([prj_gir_name], [Grilo])
+m4_define([grl_major_version], [0])
+m4_define([grl_minor_version], [1])
+m4_define([grl_micro_version], [6])
+m4_define([prj_version], grl_major_version.grl_minor_version.grl_micro_version)
 
 AC_INIT([prj_name], [prj_version])
 
@@ -45,8 +48,10 @@ GNOME_MAINTAINER_MODE_DEFINES
 
 # ABI version
 
-GRL_MAJORMINOR=0.1
+GRL_MAJORMINOR=grl_major_version.grl_minor_version
+GRL_MAJORMINOR_NORM=grl_major_version[_]grl_minor_version
 AC_SUBST(GRL_MAJORMINOR)
+AC_SUBST(GRL_MAJORMINOR_NORM)
 AC_DEFINE_UNQUOTED(GRL_MAJORMINOR, "$GRL_MAJORMINOR", [library major.minor version])
 
 # Framework name (contains ABI version)
diff --git a/src/Makefile.am b/src/Makefile.am
index 1708025..f4235d2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -94,10 +94,10 @@ introspection_sources = \
 	$(lib GRL_NAME@_la_SOURCES)
 
 Grl- GRL_MAJORMINOR@.gir: lib GRL_NAME@.la
-Grl_0_1_gir_INCLUDES = GObject-2.0 GModule-2.0
-Grl_0_1_gir_CFLAGS = $(lib GRL_NAME@_la_CFLAGS)
-Grl_0_1_gir_LIBS = lib GRL_NAME@.la
-Grl_0_1_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
+Grl_ GRL_MAJORMINOR_NORM@_gir_INCLUDES = GObject-2.0 GModule-2.0
+Grl_ GRL_MAJORMINOR_NORM@_gir_CFLAGS = $(lib GRL_NAME@_la_CFLAGS)
+Grl_ GRL_MAJORMINOR_NORM@_gir_LIBS = lib GRL_NAME@.la
+Grl_ GRL_MAJORMINOR_NORM@_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
 INTROSPECTION_GIRS += Grl- GRL_MAJORMINOR@.gir
 
 girdir = $(datadir)/gir-1.0
-- 
1.7.0.4



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