[PATCH weston v2 4/4] configure.ac: check weston vs. libweston versions

Jonas Ådahl jadahl at gmail.com
Mon Aug 15 14:13:06 UTC 2016


On Mon, Aug 15, 2016 at 03:16:50PM +0300, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> 
> Check that the defined versions for Weston and libweston are consistent
> and according to the version bumping rules:
> 
> - In pre-release and only pre-release versions the weston and libweston
>   may differ
> 
> - when they differ, libweston version must be exactly (weston.major+1).0.0
> 
> - otherwise, the versions must be exactly the same.
> 
> Cc: Jonas Ådahl <jadahl at gmail.com>
> Cc: Quentin Glidic <sardemff7+git at sardemff7.net>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

I'm not an m4 expert. With that said, I looked at the patch and it looks
like something that is good to do, so:

Acked-by: Jonas Ådahl <jadahl at gmail.com>


Jonas

> ---
>  configure.ac | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 70010fd..5ace737 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -39,6 +39,38 @@ AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests s
>  
>  AM_SILENT_RULES([yes])
>  
> +# Check Weston and libweston version consistency
> +m4_if(m4_cmp(weston_micro_version, [90]), [-1],
> +      [
> +	dnl micro < 90
> +	dnl A final or stable release, not a pre-release:
> +	dnl Weston and libweston versions must match.
> +	m4_if(weston_version, libweston_major_version[.]libweston_minor_version[.]libweston_patch_version,
> +	      [],
> +	      [AC_MSG_ERROR([Weston and libweston version mismatch for a final release])])
> +      ],
> +      [
> +	dnl A pre-release:
> +	dnl libweston must be equal or greater than weston.
> +	m4_case(m4_list_cmp([weston_major_version, weston_minor_version, weston_micro_version],
> +			     [libweston_major_version, libweston_minor_version, libweston_patch_version]),
> +		 [-1], [
> +			dnl weston < libweston
> +			dnl libweston must be weston_major+1.0.0
> +			m4_if(m4_eval(weston_major_version+1)[.0.0],
> +			      libweston_major_version[.]libweston_minor_version[.]libweston_patch_version,
> +			      [],
> +			      [AC_MSG_ERROR([libweston version is greater but not (weston_major+1).0.0])])
> +		 ],
> +		 [0], [
> +			dnl weston == libweston, all ok
> +		 ],
> +		 [1], [
> +			dnl weston > libweston, wrong
> +			AC_MSG_ERROR([Weston version is greater than libweston.])
> +		 ])
> +       ])
> +
>  # Check for programs
>  AC_PROG_CC
>  AC_PROG_SED
> -- 
> 2.7.3
> 


More information about the wayland-devel mailing list