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: Peter Johansson
Subject: Re: Strategy to specify major, minor, and patch versions
Date: Thu, 28 Aug 2014 08:45:52 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/27/2014 07:52 PM, Zé wrote:
What's the best way to set up an autoconf project so that the major, minor and patch version numbers are made available to the entire package (automake and source code) and used to define the VERSION and PACKAGE_VERSION variables?

I use this macro in my projects

http://dev.thep.lu.se/yat/svn/trunk/m4/my_version.m4

which has the following docs:

# How to use this file
# ====================
#
# Copy this file to your project, e.g. directory 'm4/'. Aclocal will
# not do that due to limitations.  In 'configure.ac', include this file
# and call 'MY_VERSION_early' before 'AC_INIT'.  After AC_INIT you can
# call MY_VERSION in order to AC_SUBST and AC_DEFINE variables
# FOO_MAJOR_VERSION, FOO_MINOR_VERSION etc., where FOO has been
# replaced with PACKAGE_NAME after appropriate translation (to suit a
# Make variable or PP #define):
#
#   m4_include([m4/my_version.m4])
#   MY_VERSION_early([3],[1],[4],[true])
#   AC_INIT([foo], [my_VERSION])
#   MY_VERSION

Cheers,
Peter





reply via email to

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