[gtksourceview/wip/api-version: 1/2] 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: 1/2] build: do not hardcode API version for the docs
- Date: Wed, 19 Oct 2016 16:06:52 +0000 (UTC)
commit 4e02ab5ce290b3dbf3d8ca697c03daec3c6df256
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 | 5 +++++
docs/reference/Makefile.am | 20 ++++++++++++++++----
...urceview-docs.xml => gtksourceview-docs.xml.in} | 2 +-
.../{lang-reference.xml => lang-reference.xml.in} | 10 +++++-----
docs/reference/lang-tutorial.xml | 2 +-
...{style-reference.xml => style-reference.xml.in} | 2 +-
6 files changed, 29 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 27bf4ed..ee6e2e1 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,9 @@ data/language-specs/Makefile
data/styles/Makefile
docs/Makefile
docs/reference/Makefile
+docs/reference/gtksourceview-docs.xml
+docs/reference/lang-reference.xml
+docs/reference/style-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..607434e 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,25 @@ 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 \
+ style-reference.xml.in
+
+DISTCLEANFILES = \
+ gtksourceview-docs.xml \
+ lang-reference.xml \
+ style-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>
diff --git a/docs/reference/lang-tutorial.xml b/docs/reference/lang-tutorial.xml
index 60f7991..9ddaa50 100644
--- a/docs/reference/lang-tutorial.xml
+++ b/docs/reference/lang-tutorial.xml
@@ -24,7 +24,7 @@ Guide 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 tutorial is suitable
+ not to the version of GtkSourceView. This tutorial is suitable
for GtkSourceView 2 and 3.
</para>
</note>
diff --git a/docs/reference/style-reference.xml b/docs/reference/style-reference.xml.in
similarity index 99%
rename from docs/reference/style-reference.xml
rename to docs/reference/style-reference.xml.in
index 6623047..fe8b081 100644
--- a/docs/reference/style-reference.xml
+++ b/docs/reference/style-reference.xml.in
@@ -25,7 +25,7 @@ This is an overview of the Style Scheme Definition XML format, describing the
meaning and usage of every element and attribute. The formal definition is
stored in the RelaxNG schema file <filename>style.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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]