tags:

views:

62

answers:

1

Sometimes due to the SCM not strictly remembering the timestamp of files the generated Makefile will think that it needs to re-run "autoreconf -i" or equivalent to re-generate Makefile.in from Makefile.am, configure from configure.ac, etc..

How do I prevent this?

I want to prevent it because it causes these problems:

  • when creating a dist archive (git archive --format=tar ...) the timestamp will be incorrect and the problem will be there for end-users. Not cool.
  • On slow systems this makes the compile take a lot longer, because it's no longer configure, make, make install, but configure, autoreconf -i, configure, make make install.

I know I can "touch" the generated files prior to making a dist tarball, but in my opinion that only solves the problem for the tarballs, not for developers. It's also an ugly hack to work around a misfeature that should just be turn-off-able. Also, it breaks git archive, since the timestamps won't always be correct there anyway.

Other SCMs also have this, so the problem is not (IMO) with git.

+5  A: 

You need to look into maintainer mode - that should prevent the autoreconf step, which will fix the end-users' problems.

Add

AM_MAINTAINER_MODE

to your configure.ac / configure.in file, then (unless you specify --enable-maintainer-mode) when you configure, you're Makefile won't contain the reconfigure rules.

Douglas Leeder
That seems to have done it. Thank you.
Thomas