[PATCH] Add (undocumented) support for version suffixes

Dodji Seketeli dodji@seketeli.org
Wed Jan 1 00:00:00 GMT 2020


Hello Matthias,

Matthias Maennich <maennich@google.com> a écrit:

> Allow appending arbitrary text to the libabigail version string
> representation. That is useful to identify custom versions of the
> library (e.g. development versions or versions of a particular origin).
>
> The feature can be enabled by passing VERSION_SUFFIX to `configure`,
> e.g.
>
>   $ configure VERSION_SUFFIX="-dev"

Nice!

[...]

> diff --git a/configure.ac b/configure.ac
> index 87605a373f51..cf03e39accff 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -41,6 +41,7 @@ VERSION_REVISION=0
>  AC_SUBST(VERSION_MAJOR)
>  AC_SUBST(VERSION_MINOR)
>  AC_SUBST(VERSION_REVISION)
> +AC_SUBST(VERSION_SUFFIX)

So, just for the sake of somewhat documenting this in the configure.ac
file, maybe you could add a comment before the line:

    +AC_SUBST(VERSION_SUFFIX)

The comment could read something like:

    dnl This VERSION_SUFFIX environment variable is to allow appending
    dnl arbitrary text to the libabigail version string representation.
    dnl That is dnl useful to identify custom versions of the library
    dnl (e.g. development versions or versions of a particular origin).
    dnl
    dnl
    dnl The feature can be enabled by passing VERSION_SUFFIX to `configure`,
    dnl e.g.
    dnl 
    dnl   $ configure VERSION_SUFFIX="-dev"


> 	* configure.ac: add substitution for VERSION_SUFFIX
> 	* include/abg-version.h.in: add define for ABIGAIL_VERSION_SUFFIX
> 	* include/abg-config.h(abigail_get_library_version): add support
> 	for a version suffix
> 	* src/abg-config.cc(abigail_get_library_version): Likewise.
> 	* src/abg-tools-utils.cc(get_library_version_string): Likewise.

To me, this is thus OK to commit to master with a comment in
configure.ac like above.

Thanks a lot for this!

Cheers,

-- 
		Dodji



More information about the Libabigail mailing list