automake
[Top][All Lists]
Advanced

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

Re: 'make' reruns configure ?!


From: Bob Proulx
Subject: Re: 'make' reruns configure ?!
Date: Mon, 5 Sep 2005 09:51:17 -0600
User-agent: Mutt/1.5.9i

Kendrick Smith wrote:
> Can anyone tell me why an Automake-generated Makefile
> would rerun the 'configure' script when 'make' is invoked,

This would mean that the timestamps on the files indicate that you
have modified a source file such as modifying a Makefile.am.  Because
the Makefile.am is newer than the Makefile the tools think it needs to
be rebuilt.

Downstream users unpacking a distribution tar.gz file should never
need to run the autotools because the tar unpacking will set the
timestamps properly.  The timestamps will indicate that the project is
up to date.  The make program will not be triggered to run automake.

One way for users to trip into this condition is to copy the unpacked
directory without copying the timestamps.

  cp -r project-1.0 myproj-0.0

Because the cp did not preserve timestamps the result depends upon how
fast your copy happened and things like that.  Better to put the -a
option there and preserve all attributes.

  cp -a project-1.0 myproj-0.0

Another way for users to trip into this condition is to check all
files, even the generated ones, into a version control system and then
do an update from it.  If the VCS does not preserve timestamps then
this can also indicate by the timestamps that the tools need to be
run to bring things up to date.

And of course there are other tools such as dpkg-source that do not
preserve timestamps and can cause inadvertent timestamps skews.

> and whether there's a (possibly heavy-handed) way to disable
> this behavior? 

There is a whole section in the automake FAQ about the "missing"
script and about the "maintainer-mode" option.  Please read the
documentation on it.  (You may need to change the version if you have
a different version of automake installed.)

  info automake-1.9 FAQ

If you wanted a heavy-handed way of making sure that make thinks your
timestamps are up to date then you can always make all files the same
timestamp.  This will make everything appear up to date.  You can then
make clean and make normally.

  find . -type f -print0 | xargs -r0 touch --reference .
  make clean
  make

Bob




reply via email to

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