summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2015-08-31 12:54:08 -0700
committerPhilip Chimento <philip@endlessm.com>2015-08-31 17:06:17 -0700
commitac0d18a18ccd0873b62b332c14cd8547e72b1a5b (patch)
tree48e0d04aff63e6be5d6c608a047f80e274af0fda
parentaf2bda2d010164308686f2c38b80c3dd21f10606 (diff)
Generate version macros from configure
This adds EOS_SDK_MAJOR_VERSION, EOS_SDK_MINOR_VERSION and EOS_SDK_MICRO_VERSION as macros in eosversion.h whose values are generated from configure with AC_SUBST, rather than in config.h using AC_DEFINE. They are also public API, so they get documenation and Since: annotations. [endlessm/eos-sdk#3071]
-rw-r--r--.gitignore1
-rw-r--r--configure.ac9
-rw-r--r--docs/reference/endless/Makefile.am3
-rw-r--r--docs/reference/endless/endless-docs.xml5
-rw-r--r--docs/reference/endless/endless-sections.txt22
-rw-r--r--endless/Makefile.am1
-rw-r--r--endless/eosapiversion-private.h (renamed from endless/eosversion.h)2
-rw-r--r--endless/eosenums.h2
-rw-r--r--endless/eostypes.h2
-rw-r--r--endless/eosversion.h.in37
10 files changed, 58 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index 36e6ff7..88c0183 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ WebHelper2OldPrivate-1.0.gir
WebHelper2OldPrivate-1.0.typelib
endless/eosresource.c
endless/eosresource-private.h
+endless/eosversion.h
tools/eos-application-manifest/eos-application-manifest
tools/eos-json-extractor/eos-json-extractor
webhelper/webhelper_private/config.js
diff --git a/configure.ac b/configure.ac
index 322c3d3..e671008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,14 +58,12 @@ AC_CACHE_SAVE
# Version numbers and macros
EOS_SDK_API_VERSION=_EOS_SDK_API_VERSION_MACRO
AC_SUBST(EOS_SDK_API_VERSION)
-AC_DEFINE([EOS_SDK_MAJOR_VERSION], [_EOS_SDK_API_VERSION_MACRO], [Major (API) version])
EOS_SDK_API_NAME="endless-$EOS_SDK_API_VERSION"
AC_SUBST(EOS_SDK_API_NAME)
-EOS_SDK_MINOR_VERSION=_EOS_SDK_MINOR_VERSION_MACRO
-EOS_SDK_MICRO_VERSION=_EOS_SDK_MICRO_VERSION_MACRO
EOS_SDK_INTERFACE_AGE=_EOS_SDK_INTERFACE_AGE_MACRO
-AC_DEFINE([EOS_SDK_MINOR_VERSION], [_EOS_SDK_MINOR_VERSION_MACRO], [Minor version])
-AC_DEFINE([EOS_SDK_MICRO_VERSION], [_EOS_SDK_MICRO_VERSION_MACRO], [Micro version])
+AC_SUBST([EOS_SDK_MAJOR_VERSION], [_EOS_SDK_API_VERSION_MACRO])
+AC_SUBST([EOS_SDK_MINOR_VERSION], [_EOS_SDK_MINOR_VERSION_MACRO])
+AC_SUBST([EOS_SDK_MICRO_VERSION], [_EOS_SDK_MICRO_VERSION_MACRO])
AC_DEFINE([EOS_SDK_VERSION], [_EOS_SDK_VERSION_MACRO], [Full version number])
# Shared library versioning; calculated automatically.
@@ -253,6 +251,7 @@ AC_CONFIG_FILES([
docs/reference/endless/Makefile
docs/reference/endless/version.xml
$EOS_SDK_API_NAME.pc
+ endless/eosversion.h
tools/eos-json-extractor/eos-json-extractor
])
AC_CONFIG_HEADERS([config.h]) dnl Header with system-dependent #defines
diff --git a/docs/reference/endless/Makefile.am b/docs/reference/endless/Makefile.am
index a4091ba..0570c33 100644
--- a/docs/reference/endless/Makefile.am
+++ b/docs/reference/endless/Makefile.am
@@ -49,7 +49,8 @@ EXTRA_HFILES=
# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
-IGNORE_HFILES= eosinit-private.h \
+IGNORE_HFILES= eosapiversion-private.h \
+ eosinit-private.h \
eostopbar-private.h \
eosmainarea-private.h \
eosactionmenu-private.h \
diff --git a/docs/reference/endless/endless-docs.xml b/docs/reference/endless/endless-docs.xml
index d716d21..908da1a 100644
--- a/docs/reference/endless/endless-docs.xml
+++ b/docs/reference/endless/endless-docs.xml
@@ -46,6 +46,11 @@
<xi:include href="xml/api-index-0.4.xml"><xi:fallback /></xi:include>
</index>
+ <index id="api-index-0.6">
+ <title>Index of new API in 0.6</title>
+ <xi:include href="xml/api-index-0.6.xml"><xi:fallback /></xi:include>
+ </index>
+
<index id="deprecated-api-index" role="deprecated">
<title>Index of deprecated API</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
diff --git a/docs/reference/endless/endless-sections.txt b/docs/reference/endless/endless-sections.txt
index 549169c..d98978d 100644
--- a/docs/reference/endless/endless-sections.txt
+++ b/docs/reference/endless/endless-sections.txt
@@ -1,27 +1,11 @@
<SECTION>
<FILE>hello</FILE>
+EOS_SDK_MAJOR_VERSION
+EOS_SDK_MINOR_VERSION
+EOS_SDK_MICRO_VERSION
eos_hello_sample_function
eos_get_system_personality
<SUBSECTION Private>
-EOS_SDK_AVAILABLE_IN_0_0
-EOS_SDK_AVAILABLE_IN_0_2
-EOS_SDK_AVAILABLE_IN_0_4
-EOS_SDK_DEPRECATED
-EOS_SDK_DEPRECATED_FOR
-EOS_SDK_DEPRECATED_IN_0_0
-EOS_SDK_DEPRECATED_IN_0_0_FOR
-EOS_SDK_DEPRECATED_IN_0_2
-EOS_SDK_DEPRECATED_IN_0_2_FOR
-EOS_SDK_DEPRECATED_IN_0_4
-EOS_SDK_DEPRECATED_IN_0_4_FOR
-EOS_SDK_UNAVAILABLE
-EOS_SDK_VERSION_0_0
-EOS_SDK_VERSION_0_2
-EOS_SDK_VERSION_0_4
-EOS_SDK_VERSION_CUR_STABLE
-EOS_SDK_VERSION_MAX_ALLOWED
-EOS_SDK_VERSION_MIN_REQUIRED
-EOS_SDK_VERSION_PREV_STABLE
EOS_DEFINE_ENUM_TYPE
EOS_ENUM_VALUE
</SECTION>
diff --git a/endless/Makefile.am b/endless/Makefile.am
index a39c1e6..143d0f3 100644
--- a/endless/Makefile.am
+++ b/endless/Makefile.am
@@ -37,6 +37,7 @@ endless_private_installed_headers = \
endless/eosflexygrid.h
endless_library_sources = \
+ endless/eosapiversion-private.h \
endless/eosapplication.c \
endless/eosattribution.c endless/eosattribution-private.h \
endless/eoscellrendererpixbuflink.c endless/eoscellrendererpixbuflink-private.h \
diff --git a/endless/eosversion.h b/endless/eosapiversion-private.h
index 0e458c6..cfcd4ec 100644
--- a/endless/eosversion.h
+++ b/endless/eosapiversion-private.h
@@ -9,6 +9,8 @@
#include <glib.h>
+#include "eosversion.h"
+
#ifdef EOS_SDK_DISABLE_DEPRECATION_WARNINGS
#define EOS_SDK_DEPRECATED
#define EOS_SDK_DEPRECATED_FOR(f)
diff --git a/endless/eosenums.h b/endless/eosenums.h
index 257f435..788b258 100644
--- a/endless/eosenums.h
+++ b/endless/eosenums.h
@@ -9,6 +9,8 @@
#include <glib-object.h>
+#include "eosapiversion-private.h"
+
G_BEGIN_DECLS
/* Shared typedefs for enumerations */
diff --git a/endless/eostypes.h b/endless/eostypes.h
index a15a309..830cca1 100644
--- a/endless/eostypes.h
+++ b/endless/eostypes.h
@@ -7,7 +7,7 @@
#error "Please do not include this header file directly."
#endif
-#include "eosversion.h"
+#include "eosapiversion-private.h"
#include "eosenums.h"
#include "eosmacros.h"
diff --git a/endless/eosversion.h.in b/endless/eosversion.h.in
new file mode 100644
index 0000000..be6f656
--- /dev/null
+++ b/endless/eosversion.h.in
@@ -0,0 +1,37 @@
+/* Copyright 2015 Endless Mobile, Inc. */
+
+#pragma once
+
+#if !(defined(_EOS_SDK_INSIDE_ENDLESS_H) || defined(COMPILING_EOS_SDK))
+#error "Please do not include this header file directly."
+#endif
+
+/**
+ * EOS_SDK_MAJOR_VERSION:
+ *
+ * Major version number (API level) of the Endless SDK library.
+ * For example, this is 0 for version 0.6.1.
+ *
+ * Since: 0.6
+ */
+#define EOS_SDK_MAJOR_VERSION (@EOS_SDK_MAJOR_VERSION@)
+/**
+ * EOS_SDK_MINOR_VERSION:
+ *
+ * Minor version number of the Endless SDK library.
+ * For example, this is 6 for version 0.6.1.
+ * An even number indicates a stable release, while an odd number is used for
+ * development snapshots.
+ *
+ * Since: 0.6
+ */
+#define EOS_SDK_MINOR_VERSION (@EOS_SDK_MINOR_VERSION@)
+/**
+ * EOS_SDK_MICRO_VERSION:
+ *
+ * Micro version number of the Endless SDK library.
+ * For example, this is 1 for version 0.6.1.
+ *
+ * Since: 0.6
+ */
+#define EOS_SDK_MICRO_VERSION (@EOS_SDK_MICRO_VERSION@)