Re-running autogen.sh
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Fri Sep 14 06:04:47 PDT 2012
On 2012-09-14 02:33, David Holmes wrote:
> A couple of changesets in the past day have updated the generated
> configure script. But when I try to run configure it complains that
> the sources are newer than the generated files. AFAICS that was not
> the case based on the time stamps and I even did a touch but to no
> avail. I had to re-run autogen.sh myself (which then causes a merge
> conflict the next time they change).
There are actually two checks made, which unfortunately shares the same
error message, so you can't tell which one triggered. Seemed economical
at the point, but maybe is not so good...
The first check is on timestamps. This is problematic, since that is not
the entire story. Timestamps can get out of order when checking out with
mercurial, so if the generated files are checked out prior to the source
files, this check will trigger incorrectly.
I believe this check must go away before we switch to this as default.
For the moment, though, it has caught me testing the wrong stuff more
often than it has given me false positives, so I think it's useful. If
this triggers incorrectly, a touch should be enough. However, you need
to touch both the normal and the custom generated file (if you have such).
The second check is more reliable. It compares monotonically increasing
serial numbers (basically timestamps, but it doesn't really matter)
between the normal and the custom generated file, if the custom file
esists. If they are not equal, an error will be printing. This typically
happens if someone checked in an updated normal file without also
updating the closed file. (Or if you didn't pull/update all repos.)
This check will need to stay. If the open part is updated, this will
warn that the closed counterpart needs to be updated as well. If the
person updating the open part do not have access to the closed part,
someone else will need to detect that this has happened and update the
closed part as well. Unfortunately, even going forward, I see no way of
getting rid of these "linked" updates, short of requiring autoconf as a
neccessary build tool.
/Magnus
More information about the build-infra-dev
mailing list