Thomas
Thomas

Reputation: 4255

How do I prevent autotools from re-generating configure script automatically?

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:

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.

Upvotes: 5

Views: 917

Answers (1)

Douglas Leeder
Douglas Leeder

Reputation: 53320

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.

Upvotes: 10

Related Questions