[apparmor] [patch 3/6] move version definition to separate file
Kees Cook
kees at ubuntu.com
Thu Oct 7 23:20:22 BST 2010
ACK. yay for m4 magic :)
On Thu, Oct 07, 2010 at 03:09:02PM -0700, Steve Beattie wrote:
> This patch moves the overall version definition of the software out of
> the common/Make.rules file into common/Version so that libapparmor's
> configure.in can make use of it, meaning there's one less thing to
> adjust when updating the version. It also bumps the trunk version from
> 2.5 to 2.5.90 in (perhaps excessively long) preparation for the 2.6.0
> release, and to indicate that it's newer than the 2.5.x branch.
>
> ---
> common/Make.rules | 2 +-
> common/Version | 1 +
> libraries/libapparmor/configure.in | 7 ++++++-
> 3 files changed, 8 insertions(+), 2 deletions(-)
>
> Index: b/libraries/libapparmor/configure.in
> ===================================================================
> --- a/libraries/libapparmor/configure.in
> +++ b/libraries/libapparmor/configure.in
> @@ -1,6 +1,11 @@
> +m4_define([__apparmor_version], m4_sinclude(common/Version))
> +m4_ifdef(__apparmor_version, , m4_define([__apparmor_version], m4_sinclude(../../common/Version)))
> +m4_define([__aalen], decr(len(__apparmor_version)))
> +m4_define([apparmor_version], m4_substr(__apparmor_version, 0, __aalen))
> +
> AC_INIT(configure.in)
>
> -AM_INIT_AUTOMAKE(libapparmor1, 2.5)
> +AM_INIT_AUTOMAKE(libapparmor1, apparmor_version)
>
> AM_PROG_LEX
> AC_PROG_YACC
> Index: b/common/Version
> ===================================================================
> --- /dev/null
> +++ b/common/Version
> @@ -0,0 +1 @@
> +2.5.90
> Index: b/common/Make.rules
> ===================================================================
> --- a/common/Make.rules
> +++ b/common/Make.rules
> @@ -25,7 +25,7 @@
> # directories
>
> DISTRIBUTION=AppArmor
> -VERSION=2.5
> +VERSION=$(shell cat common/Version)
>
> # OVERRIDABLE variables
> # Set these variables before including Make.rules to change its behavior
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
--
Kees Cook
Ubuntu Security Team
More information about the AppArmor
mailing list