autoconf
[Top][All Lists]
Advanced

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

generated version numbers


From: Harlan Stenn
Subject: generated version numbers
Date: Sat, 22 Feb 2014 07:47:36 +0000

The top few lines of NTP's configure.ac are, effectively:

 m4_include([version.m4])
 AC_INIT([ntp], [VERSION_NUMBER], ...)

and version.m4 consists of a single line that looks like:

 m4_define([VERSION_NUMBER],[4.2.7p413])

For a long time, when it's time to roll a -dev (or a release) tarball
for NTP we'll:

- "bump" the "pNNN" number (which is master-saved in packageinfo.sh and
  that value is used generate version.m4), 
- do a "make distcheck" (which will first propagate the new version
  number from packageinfo.sh to version.m4) 
- check in all of the files that change because of the new version
  number (version.m4 is *not* checked in, but packageinfo.sh is)
- "make dist" and publish the tarball

The above is a rough overview, and know that the final "make dist"
doesn't do anything that creates updated files so no further checkin is
needed.  Yes, it's kinda intricate, but it's the simplest I've been able
to come up with given that I don't have to mess with it often.

The resulting tarball builds fine and needs no autotools.

If somebody does a repo checkout (or updates their existing copy)
instead of using the tarball, they run a "./bootstrap" script that:

- updates version.m4 from packageinfo.sh
- appropriately touches a bunch of files to avoid needlessly
  regenerating flex/yacc targets, documentation files, etc.
- runs autoconf -vi

This last part should regenerate config.h.in because VERSION_NUMBER will
have changed, and as I wrote above, the first 2 lines of configure.ac
are:

 m4_include([version.m4])
 AC_INIT([ntp], [VERSION_NUMBER], ...)

and config.h.in will #define PACKAGE_VERSION.

But apparently something strange is going on, because after we run the
bootstrap script, if we run "make" we see:

...
       Prerequisite `../version.m4' is newer than target `../config.h.in'.
       Prerequisite `../aclocal.m4' is newer than target`../config.h.in'.
      Must remake target `../config.h.in'.
...

And this makes no sense to me because:

- version.m4 is updated *first* in the bootstrap script
- autoreconf (which updates aclocal) is done after that

so obviously I'm missing something.

I'm continuing to dig into this, and if anybody has any ideas I'd love
to hear them.
-- 
Harlan Stenn <address@hidden>
http://networktimefoundation.org  - be a member!



reply via email to

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