[gtksourceview/wip/gsv-4: 2/4] Bump API version to 4



commit e9f7a1c46aaa7938d9f569099ce22fbdfafa7c6c
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Nov 4 18:32:40 2016 +0100

    Bump API version to 4
    
    The previous API version was "3.0". Now instead of being "4.0", it is
    just "4" because it is more logical: from the package version (of the
    form major.minor.micro), only the major version gathers
    backward-compatibility information, i.e. the API version.
    
    This is what the GNOME Programming Guidelines recommend:
    https://developer.gnome.org/programming-guidelines/unstable/parallel-installability.html.en
    
    It also permits to use the GSV_API_VERSION variable in the
    gtksourceview/ directory.

 configure.ac                                       |   14 +--
 docs/reference/Makefile.am                         |    6 +-
 ...sections.txt => gtksourceview-4.0-sections.txt} |    0
 gtksourceview/Makefile.am                          |   98 ++++++++++----------
 .../completion-providers/words/Makefile.am         |    2 +-
 po/Makevars                                        |    2 +-
 6 files changed, 62 insertions(+), 60 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ef2725b..2f781f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,24 +42,20 @@ AC_SUBST(GTK_SOURCE_MICRO_VERSION)
 # When incrementing the API version (usually for a new major package version),
 # set CURRENT, REVISION and AGE to 0 since it's like a new library.
 
-GSV_LT_CURRENT=8
+GSV_LT_CURRENT=0
 GSV_LT_REVISION=0
-GSV_LT_AGE=7
+GSV_LT_AGE=0
 GSV_LT_VERSION="$GSV_LT_CURRENT:$GSV_LT_REVISION:$GSV_LT_AGE"
 AC_SUBST(GSV_LT_VERSION)
 
 # API version, used for parallel installability.
 # Not used in:
 # - po/Makevars
-# - the docs/reference/gtksourceview-3.0-sections.txt filename
-# - the gtksourceview/ directory and sub-directories, because make variables
-#   need to be transformed (3.0 -> 3_0), and it doesn't work if two different
-#   variables are used (it must be the same variable). With GSV_API_VERSION
-#   defined to a single digit (4 instead of 4.0), then it would work.
+# - the docs/reference/gtksourceview-4.0-sections.txt filename
 # Because as far as I've tested, it is not easily feasible to not hardcode the
 # API version in those places (swilmet).
-GSV_API_VERSION=3.0
-GSV_MAJOR_API_VERSION=3
+GSV_API_VERSION=4
+GSV_MAJOR_API_VERSION=4
 AC_SUBST(GSV_API_VERSION)
 AC_SUBST(GSV_MAJOR_API_VERSION)
 
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 26fad1f..7e5b20c 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -2,7 +2,11 @@
 AUTOMAKE_OPTIONS = 1.6
 
 # The name of the module.
-DOC_MODULE = gtksourceview-@GSV_API_VERSION@
+# For library-web, it's simpler if the DOC_MODULE follows the scheme:
+# $name-$major.$minor
+# (to show the API online at developer.gnome.org)
+# So, add ".0".
+DOC_MODULE = gtksourceview-@GSV_API_VERSION@.0
 
 # The top-level XML file (SGML in the past).
 DOC_MAIN_SGML_FILE = gtksourceview-docs.xml
diff --git a/docs/reference/gtksourceview-3.0-sections.txt b/docs/reference/gtksourceview-4.0-sections.txt
similarity index 100%
rename from docs/reference/gtksourceview-3.0-sections.txt
rename to docs/reference/gtksourceview-4.0-sections.txt
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 5d5ca5f..4439275 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -173,33 +173,34 @@ libgtksourceview_core_la_LDFLAGS += -framework Cocoa
 endif
 
 # The real library
-lib_LTLIBRARIES = libgtksourceview-3.0.la
+lib_LTLIBRARIES = libgtksourceview-@GSV_API_VERSION@.la
 
-libgtksourceview_3_0_la_SOURCES =
+libgtksourceview_@GSV_API_VERSION@_la_SOURCES =
 
-libgtksourceview_3_0_la_LIBADD =                                       \
+libgtksourceview_@GSV_API_VERSION@_la_LIBADD =                                 \
        -lm                                                             \
        libgtksourceview-core.la                                        \
        completion-providers/words/libgtksourcecompletionwords.la       \
        $(DEP_LIBS) $(GTK_MAC_LIBS)
 
-libgtksourceview_3_0_la_CFLAGS =       \
-       $(HIDDEN_VISIBILITY_CFLAGS)     \
+libgtksourceview_@GSV_API_VERSION@_la_CFLAGS = \
+       $(HIDDEN_VISIBILITY_CFLAGS)             \
        $(CODE_COVERAGE_CFLAGS)
 
-libgtksourceview_3_0_la_LDFLAGS =              \
+libgtksourceview_@GSV_API_VERSION@_la_LDFLAGS =        \
        -version-info $(GSV_LT_VERSION)         \
        -no-undefined                           \
        -export-dynamic                         \
        $(WARN_LDFLAGS)                         \
        $(CODE_COVERAGE_LDFLAGS)
 
-libgtksourceview_3_0_includedir = $(includedir)/gtksourceview-3.0/gtksourceview
+libgtksourceview_@GSV_API_VERSION@_includedir =                                \
+       $(includedir)/gtksourceview-@GSV_API_VERSION@/gtksourceview
 
-libgtksourceview_3_0_include_HEADERS = $(libgtksourceview_public_headers)
+libgtksourceview_@GSV_API_VERSION@_include_HEADERS = $(libgtksourceview_public_headers)
 
-nodist_libgtksourceview_3_0_include_HEADERS =  \
-       gtksourceversion.h                      \
+nodist_libgtksourceview_@GSV_API_VERSION@_include_HEADERS =    \
+       gtksourceversion.h                                      \
        gtksourceview-enumtypes.h
 
 gtksourceview-resources.c: gtksourceview.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--sourcedir=$(srcdir) --generate-dependencies $(srcdir)/gtksourceview.gresource.xml)
@@ -274,39 +275,39 @@ libgtksourcecompletionwords_files =       \
 
 if HAVE_INTROSPECTION
 -include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS = GtkSource-3.0.gir
+INTROSPECTION_GIRS = GtkSource-@GSV_API_VERSION@.gir
 
 INTROSPECTION_SCANNER_ENV = CC="$(CC)"
 
-GtkSource-3.0.gir: libgtksourceview-3.0.la $(BUILT_SOURCES)
+GtkSource-@GSV_API_VERSION@.gir: libgtksourceview-@GSV_API_VERSION@.la $(BUILT_SOURCES)
 INTROSPECTION_SCANNER_ARGS =                   \
        -I$(top_srcdir)                         \
        -I$(top_builddir)                       \
        --c-include=gtksourceview/gtksource.h   \
        --warn-all
-GtkSource_3_0_gir_NAMESPACE = GtkSource
-GtkSource_3_0_gir_VERSION = 3.0
-GtkSource_3_0_gir_CFLAGS = $(DEP_CFLAGS)
-GtkSource_3_0_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
-GtkSource_3_0_gir_LIBS = libgtksourceview-3.0.la
+GtkSource_@GSV_API_VERSION@_gir_NAMESPACE = GtkSource
+GtkSource_@GSV_API_VERSION@_gir_VERSION = @GSV_API_VERSION@
+GtkSource_@GSV_API_VERSION@_gir_CFLAGS = $(DEP_CFLAGS)
+GtkSource_@GSV_API_VERSION@_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
+GtkSource_@GSV_API_VERSION@_gir_LIBS = libgtksourceview-@GSV_API_VERSION@.la
 
 # Ensure that gtksource.h is the first one.
-GtkSource_3_0_gir_FILES =                      \
+GtkSource_@GSV_API_VERSION@_gir_FILES =                \
        gtksource.h                             \
        $(libgtksourcecompletionwords_files)    \
        $(libgtksourceview_public_headers)      \
        $(libgtksourceview_public_c_files)      \
        $(BUILT_SOURCES)
 
-GtkSource_3_0_gir_INCLUDES = Gtk-3.0 Gdk-3.0
-GtkSource_3_0_gir_PACKAGES = gtk+-3.0 gdk-3.0
-GtkSource_3_0_gir_EXPORT_PACKAGES = gtksourceview-3.0
+GtkSource_@GSV_API_VERSION@_gir_INCLUDES = Gtk-3.0 Gdk-3.0
+GtkSource_@GSV_API_VERSION@_gir_PACKAGES = gtk+-3.0 gdk-3.0
+GtkSource_@GSV_API_VERSION@_gir_EXPORT_PACKAGES = gtksourceview-@GSV_API_VERSION@
 
 girdir = $(datadir)/gir-1.0
-gir_DATA = GtkSource-3.0.gir
+gir_DATA = GtkSource-@GSV_API_VERSION@.gir
 
 typelibdir = $(libdir)/girepository-1.0
-typelib_DATA = GtkSource-3.0.typelib
+typelib_DATA = GtkSource-@GSV_API_VERSION@.typelib
 
 CLEANFILES +=          \
        $(gir_DATA)     \
@@ -317,11 +318,12 @@ endif # HAVE_INTROSPECTION
 if ENABLE_VAPIGEN
 -include $(VAPIGEN_MAKEFILE)
 
-gtksourceview-3.0.vapi: GtkSource-3.0.gir
+gtksourceview-@GSV_API_VERSION@.vapi: GtkSource-@GSV_API_VERSION@.gir
 
-VAPIGEN_VAPIS = gtksourceview-3.0.vapi
+VAPIGEN_VAPIS = gtksourceview-@GSV_API_VERSION@.vapi
 
-gtksourceview_3_0_vapi_DEPS = atk \
+gtksourceview_@GSV_API_VERSION@_vapi_DEPS = \
+       atk \
        gdk-3.0 \
        gdk-pixbuf-2.0 \
        gio-2.0 \
@@ -329,18 +331,18 @@ gtksourceview_3_0_vapi_DEPS = atk \
        pango \
        cairo
 
-gtksourceview-3.0.deps:
-       $(AM_V_GEN) for pkg in $(gtksourceview_3_0_vapi_DEPS); do \
+gtksourceview-@GSV_API_VERSION@.deps:
+       $(AM_V_GEN) for pkg in $(gtksourceview_@GSV_API_VERSION@_vapi_DEPS); do \
                echo $$pkg >> $@; \
        done
 
-gtksourceview_3_0_vapi_METADATADIRS = $(srcdir)
-gtksourceview_3_0_vapi_FILES = GtkSource-3.0.gir
+gtksourceview_@GSV_API_VERSION@_vapi_METADATADIRS = $(srcdir)
+gtksourceview_@GSV_API_VERSION@_vapi_FILES = GtkSource-@GSV_API_VERSION@.gir
 
 vapidir = $(datadir)/vala/vapi
-vapi_DATA =                    \
-       gtksourceview-3.0.vapi  \
-       gtksourceview-3.0.deps
+vapi_DATA =                                    \
+       gtksourceview-@GSV_API_VERSION@.vapi    \
+       gtksourceview-@GSV_API_VERSION@.deps
 
 CLEANFILES += $(vapi_DATA)
 
@@ -366,10 +368,10 @@ gtksourceview_FILES =                                     \
        $(gtksource_win32_more_sources)
 
 gtksourceview_EXCLUDES = dummy
-gtksourceview_HEADERS_DIR = $(libgtksourceview_3_0_includedir)
+gtksourceview_HEADERS_DIR = $(libgtksourceview_@GSV_API_VERSION@_includedir)
 gtksourceview_HEADERS_INST = \
        $(libgtksourceview_public_headers)      \
-       $(nodist_libgtksourceview_3_0_include_HEADERS)
+       $(nodist_libgtksourceview_@GSV_API_VERSION@_include_HEADERS)
 
 gtksourceview_HEADERS_EXCLUDES = dummy
 
@@ -388,29 +390,29 @@ $(top_builddir)/build/win32/enums.headers: $(libgtksourceview_public_headers)
 # NMake/MSVC introspection
 if HAVE_INTROSPECTION
 NMAKE_INTROSPECTION_FILES = \
-       $(top_builddir)/build/win32/GtkSource-3.0.gir.msvc.introspect   \
-       $(top_builddir)/build/win32/GtkSource_3_0_gir_list
+       $(top_builddir)/build/win32/GtkSource-@GSV_API_VERSION  gir msvc.introspect \
+       $(top_builddir)/build/win32/GtkSource_@GSV_API_VERSION@_gir_list
 
-MSVC_INTROSPECT_GIRS = GtkSource-3.0.gir
+MSVC_INTROSPECT_GIRS = GtkSource-@GSV_API_VERSION@.gir
 
 # Ensure that gtksource.h is the first one.
-GtkSource_3_0_gir_MSVC_FILES = \
+GtkSource_@GSV_API_VERSION@_gir_MSVC_FILES =   \
        gtksource.h                             \
        $(libgtksourcecompletionwords_files)    \
        $(libgtksourceview_public_headers)      \
        $(libgtksourceview_public_c_files)      \
        $(BUILT_SOURCES)
 
-GtkSource_3_0_gir_MSVC_INCLUDE_GIRS = Gtk-3.0 Gdk-3.0
-GtkSource_3_0_gir_MSVC_PACKAGES = gtk+-3.0 gdk-3.0
-GtkSource_3_0_gir_MSVC_EXPORT_PACKAGES = gtksourceview-3.0
-GtkSource_3_0_gir_MSVC_LIBS = gtksourceview-3.0
-GtkSource_3_0_gir_MSVC_CFLAGS = -I..\\..
+GtkSource_@GSV_API_VERSION@_gir_MSVC_INCLUDE_GIRS = Gtk-3.0 Gdk-3.0
+GtkSource_@GSV_API_VERSION@_gir_MSVC_PACKAGES = gtk+-3.0 gdk-3.0
+GtkSource_@GSV_API_VERSION@_gir_MSVC_EXPORT_PACKAGES = gtksourceview-@GSV_API_VERSION@
+GtkSource_@GSV_API_VERSION@_gir_MSVC_LIBS = gtksourceview-@GSV_API_VERSION@
+GtkSource_@GSV_API_VERSION@_gir_MSVC_CFLAGS = -I..\\..
 
-GtkSource_3_0_gir_MSVC_SCANNERFLAGS = \
-       --c-include=gtksourceview/gtksource.h   \
-       --warn-all      \
-       --filelist=GtkSource_3_0_gir_list
+GtkSource_@GSV_API_VERSION@_gir_MSVC_SCANNERFLAGS =    \
+       --c-include=gtksourceview/gtksource.h           \
+       --warn-all                                      \
+       --filelist=GtkSource_@GSV_API_VERSION@_gir_list
 
 include $(top_srcdir)/build/Makefile.msvc-introspection
 else
diff --git a/gtksourceview/completion-providers/words/Makefile.am 
b/gtksourceview/completion-providers/words/Makefile.am
index 97bf31e..6bbac55 100644
--- a/gtksourceview/completion-providers/words/Makefile.am
+++ b/gtksourceview/completion-providers/words/Makefile.am
@@ -37,7 +37,7 @@ libgtksourcecompletionwords_la_LDFLAGS =      \
        $(CODE_COVERAGE_LDFLAGS)
 
 libgtksourcecompletionwords_includedir = \
-       $(includedir)/gtksourceview-3.0/gtksourceview/completion-providers/words
+       $(includedir)/gtksourceview-@GSV_API_VERSION@/gtksourceview/completion-providers/words
 
 libgtksourcecompletionwords_include_HEADERS =          \
        $(libgtksourcecompletionwords_headers)
diff --git a/po/Makevars b/po/Makevars
index c356f09..e737e74 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -1,7 +1,7 @@
 # Makefile variables for PO directory in any package using GNU gettext.
 
 # Usually the message domain is the same as the package name.
-DOMAIN = gtksourceview-3.0
+DOMAIN = gtksourceview-4
 
 # These two variables depend on the location of this directory.
 subdir = po


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