[gtksourceview/wip/api-version] build: do not hardcode API version for the docs
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/api-version] build: do not hardcode API version for the docs
- Date: Wed, 19 Oct 2016 15:47:34 +0000 (UTC)
commit 3bba10911983eac9105f422c85e8875059edbb08
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Oct 19 17:32:18 2016 +0200
build: do not hardcode API version for the docs
configure.ac | 4 ++++
docs/reference/Makefile.am | 18 ++++++++++++++----
...urceview-docs.xml => gtksourceview-docs.xml.in} | 2 +-
.../{lang-reference.xml => lang-reference.xml.in} | 10 +++++-----
4 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 27bf4ed..a7532a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,9 @@ AC_SUBST(GSV_LT_VERSION)
# 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
AC_SUBST(GSV_API_VERSION)
+AC_SUBST(GSV_MAJOR_API_VERSION)
# Dependencies
glib_req=2.48
@@ -239,6 +241,8 @@ data/language-specs/Makefile
data/styles/Makefile
docs/Makefile
docs/reference/Makefile
+docs/reference/gtksourceview-docs.xml
+docs/reference/lang-reference.xml
gtksourceview/Makefile
gtksourceview/gtksourceversion.h
gtksourceview/completion-providers/Makefile
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index f322df4..7967cd4 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = 1.6
# The name of the module.
-DOC_MODULE = gtksourceview-3.0
+DOC_MODULE = gtksourceview-@GSV_API_VERSION@
# The top-level XML file (SGML in the past).
DOC_MAIN_SGML_FILE = gtksourceview-docs.xml
@@ -80,13 +80,23 @@ FIXXREF_OPTIONS =
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
GTKDOC_CFLAGS = -I$(top_srcdir) $(DEP_CFLAGS)
-GTKDOC_LIBS = $(top_builddir)/gtksourceview/libgtksourceview-3.0.la $(DEP_LIBS)
+GTKDOC_LIBS = \
+ $(top_builddir)/gtksourceview/libgtksourceview-@GSV_API_VERSION@.la \
+ $(DEP_LIBS)
MAINTAINERCLEANFILES = \
- gtksourceview-3.0-overrides.txt \
- gtksourceview-3.0.types
+ $(DOC_MODULE)-overrides.txt \
+ $(DOC_MODULE).types
# include common portion ...
include $(top_srcdir)/gtk-doc.make
+EXTRA_DIST += \
+ gtksourceview-docs.xml.in \
+ lang-reference.xml.in
+
+DISTCLEANFILES = \
+ gtksourceview-docs.xml \
+ lang-reference.xml
+
-include $(top_srcdir)/git.mk
diff --git a/docs/reference/gtksourceview-docs.xml b/docs/reference/gtksourceview-docs.xml.in
similarity index 98%
rename from docs/reference/gtksourceview-docs.xml
rename to docs/reference/gtksourceview-docs.xml.in
index 88ce7eb..a01eaf3 100644
--- a/docs/reference/gtksourceview-docs.xml
+++ b/docs/reference/gtksourceview-docs.xml.in
@@ -8,7 +8,7 @@
]>
<book id="index">
<bookinfo>
- <title>GtkSourceView 3 Reference Manual</title>
+ <title>GtkSourceView @GSV_MAJOR_API_VERSION@ Reference Manual</title>
<releaseinfo>for GtkSourceView &package_version;</releaseinfo>
</bookinfo>
diff --git a/docs/reference/lang-reference.xml b/docs/reference/lang-reference.xml.in
similarity index 98%
rename from docs/reference/lang-reference.xml
rename to docs/reference/lang-reference.xml.in
index a6fd57d..0ebed49 100644
--- a/docs/reference/lang-reference.xml
+++ b/docs/reference/lang-reference.xml.in
@@ -24,7 +24,7 @@ Reference to the GtkSourceView language definition file format
<note>
<para>
The version 2 here refers to the language definition file format,
- not to the version of GtkSourceView. So this reference is suitable
+ not to the version of GtkSourceView. This reference is suitable
for GtkSourceView 2 and 3.
</para>
</note>
@@ -34,17 +34,17 @@ This is an overview of the Language Definition XML format, describing the
meaning and usage of every element and attribute. The formal definition is
stored in the RelaxNG schema file <filename>language2.rng</filename> which
should be installed on your system in the directory
-<filename>${PREFIX}/share/gtksourceview-3.0/</filename> (where
+<filename>${PREFIX}/share/gtksourceview-@GSV_API_VERSION@/</filename> (where
<filename>${PREFIX}</filename> can be <filename>/usr/</filename> or
<filename>/usr/local/</filename> if you have installed from source.
</para>
<para>
The preinstalled language files are located in
-<filename>${PREFIX}/share/gtksourceview-3.0/language-specs/</filename>. Custom
+<filename>${PREFIX}/share/gtksourceview-@GSV_API_VERSION@/language-specs/</filename>. Custom
user languages are usually placed in
-<filename>~/.local/share/gtksourceview-3.0/language-specs/</filename>. Note:
-replace 3 with 2 in the path for GtkSourceView version 2.
+<filename>~/.local/share/gtksourceview-@GSV_API_VERSION@/language-specs/</filename>. Note:
+replace @GSV_MAJOR_API_VERSION@ with 2 in the path for GtkSourceView version 2.
</para>
</refsect1>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]