Skip to content

Commit

Permalink
configure.ac, lib: rename "extra" (version) to "development stage"
Browse files Browse the repository at this point in the history
"Extra" is a term which we'll use for something else brought by a
subsequent patch.

I took the "development stage" term from
<https://en.wikipedia.org/wiki/Software_release_life_cycle#Stages_of_development>,
where "Release candidate" is one of the stages.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I285fbf9851cde41a520079b4c31cdc5d8bf32412
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2835
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
  • Loading branch information
eepp authored and jgalar committed Jan 21, 2020
1 parent 2491e1b commit 19e20ba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ AC_PREREQ([2.50])
m4_define([bt_version_major], [2])
m4_define([bt_version_minor], [0])
m4_define([bt_version_patch], [0])
m4_define([bt_version_extra], [-rc4])
m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_extra)
m4_define([bt_version_dev_stage], [-rc4])
m4_define([bt_version], bt_version_major[.]bt_version_minor[.]bt_version_patch[]bt_version_dev_stage)
m4_define([bt_version_name], [])
m4_define([bt_version_description], [])

Expand All @@ -52,7 +52,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_DEFINE([BT_VERSION_MAJOR], bt_version_major, [Babeltrace major version])
AC_DEFINE([BT_VERSION_MINOR], bt_version_minor, [Babeltrace minor version])
AC_DEFINE([BT_VERSION_PATCH], bt_version_patch, [Babeltrace patch version])
AC_DEFINE([BT_VERSION_EXTRA], ["]bt_version_extra["], [Babeltrace extra version])
AC_DEFINE([BT_VERSION_DEV_STAGE], ["]bt_version_dev_stage["], [Babeltrace version development stage (can be empty)])
AC_DEFINE([BT_VERSION_NAME], ["]bt_version_name["], [Babeltrace version name])
AC_DEFINE([BT_VERSION_DESCRIPTION], ["]bt_version_description["], [Babeltrace version description])

Expand Down
12 changes: 6 additions & 6 deletions include/babeltrace2/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ library's version:
<dt>Patch version</dt>
<dd>bt_version_get_patch()</dd>
<dt>Extra information</dt>
<dd>bt_version_get_extra()</dd>
<dt>Development stage</dt>
<dd>bt_version_get_development_stage()</dd>
</dl>
You can also get the version's name and description if available with
Expand Down Expand Up @@ -89,15 +89,15 @@ extern unsigned int bt_version_get_patch(void);

/*!
@brief
Returns extra information about the version of libbabeltrace2.
Returns the development stage of libbabeltrace2's version.
This extra information can contain a version suffix such as
The development stage \em can contain a version suffix such as
<code>-pre5</code> or <code>-rc1</code>.
@returns
Extra information about the library's version, or \c NULL if none.
Development stage of the library's version, or \c NULL if none.
*/
extern const char *bt_version_get_extra(void);
extern const char *bt_version_get_development_stage(void);

/*!
@brief
Expand Down
7 changes: 4 additions & 3 deletions src/lib/babeltrace2.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ unsigned int bt_version_get_minor(void)
return BT_VERSION_MINOR;
}

unsigned int bt_version_get_patch(void) {
unsigned int bt_version_get_patch(void)
{
return BT_VERSION_PATCH;
}

const char *bt_version_get_extra(void)
const char *bt_version_get_development_stage(void)
{
return strlen(BT_VERSION_EXTRA) == 0 ? NULL : BT_VERSION_EXTRA;
return strlen(BT_VERSION_DEV_STAGE) == 0 ? NULL : BT_VERSION_DEV_STAGE;
}

const char *bt_version_get_name(void)
Expand Down
4 changes: 2 additions & 2 deletions src/lib/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ void bt_logging_set_global_level(enum bt_logging_level log_level)
static
void __attribute__((constructor)) bt_logging_ctor(void)
{
const char *v_extra = bt_version_get_extra() ? bt_version_get_extra() :
"";
const char *v_extra = bt_version_get_development_stage() ?
bt_version_get_development_stage() : "";

bt_logging_set_global_level(
bt_log_get_level_from_env("LIBBABELTRACE2_INIT_LOG_LEVEL"));
Expand Down

0 comments on commit 19e20ba

Please sign in to comment.