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

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

 



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



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux