On 08/27/2014 04:10 PM, Eric Blake wrote:
That took the 'AC_INIT is canonical, derive everything else from it'
approach.
Yeah, that approach is sub-optimal. I was thinking of a way to specify
the major/minor/patch version numbers beforehand, and then pass them off
to AC_INIT.
I tried doing that with variables but as my autoconf/m4 skills are close
to nonexisting, I failed to get anything to work properly.
It should also be possible to do the reverse: declare m4
macros and shell variables up front for major/minor/patch, then generate
AC_INIT by calling those macros rather than open-coding the version.
That would be preferable. Is there any way to pull that off? I've
tried with variables, but nothing behaved quite as I expected it to
behave. For example, say there these variables are declared in
configure.ac prior to calling AC_INIT:
MAJOR_VERSION = 1
MINOR_VERSION = 0
PATCH_VERSION = 0
let's say the intended outcome is to pass the version number to AC_INIT,
so that it would be equivalent to:
AC_INIT([foo], [1.0.0])
What arcane magic would be required to get this to work?
Thanks,
Zé
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf