Post by Václav Slavík Post by Stefano Antonelli
Is there a way to keep the version number in only one location (ie.
the bakefile) and have configure.ac use it for the call to
Sorry, how does this make sense as a Bakefile question?
Bakefile doesn't solve this problem now, but Bakefile is the right place
to solve it.
In my own Bakefile-based project, MySQL++, there are still two places
you have to change the version number for each release: configure.ac and
All the other places that need the version number are now .in files so
the configure script subs the version number into them. You can't do
that with mysql++.bkl because that creates chicken-and-egg problem.
configure.ac needs autoconf_inc.m4, generated by Bakefile, but if
mysql++.bkl is to be generated from a .in file by configure, configure
must already exist, which it can't because autoconf will fail to run if
the .m4 doesn't exist yet.
I've looked into it, and as far as I can tell, the keystone of the
problem is bakefile_gen. It currently requires the .bkl file to run,
and it creates both Makefile.in and autoconf_inc.m4. You could solve
the redundant version number problem if this were broken into two steps:
one that created autoconf_inc.m4 without needing the .bkl file (or at
least, could accept a .bkl.in file) and a separate step for creating
Makefile.in and all the other project files and Makefile variants.