autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strategy to specify major, minor, and patch versions


From:
Subject: Re: Strategy to specify major, minor, and patch versions
Date: Fri, 29 Aug 2014 13:52:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0

On 08/28/2014 11:28 AM, Eric Blake wrote:
Untested:

# M4 macros, for use during autoconf time...
m4_define([MAJOR_VERSION], [1])
m4_define([MINOR_VERSION], [0])
m4_define([PATCH_VERSION], [0])
AC_INIT([foo], MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION)

Thanks for providing an example. It appears to have worked. I've used it in a project with the addition of a couple of very minor tweaks.

The configure.in file starts off with this:

# Autoconf script

AC_PREREQ(2.61)

m4_define([MAJOR_VERSION], [1])
m4_define([MINOR_VERSION], [0])
m4_define([PATCH_VERSION], [0])

AC_INIT(foo,[MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION])
AM_INIT_AUTOMAKE(foo,[MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION])

# (...)

Two questiosn:

1) is there anything wrong with the way this script has been set?

2) I realize this is a very basic question, but here it goes: is there a way to list the MAJOR_VERSION, MINOR_VERSION and PATCH_VERSION variables in the config.h file?


Thanks,
Zé



reply via email to

[Prev in Thread] Current Thread [Next in Thread]