How can I automatically disable the autotools configure script auto-tuning?

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

How to prevent this?

I want to prevent this because it causes the following 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 compilation much longer, because it no longer configures, does not, installs, but configures, autoreconf -i, configure, make make install.

I know that I can β€œtouch” the generated files before I create the archive-archive, but, in my opinion, it solves the problem only for tarballs, and not for developers. It's also an ugly hack to get around an inaccuracy that should just be turned off. In addition, it splits the git archive, as timestamps will not always be correct there.

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

+4
source share
1 answer

You need to look into the mode of the supporting device - this should prevent the autoreconf step, which will eliminate the problems of end users.

Add

AM_MAINTAINER_MODE 

into your configure.ac/configure.in file, then (if you do not specify --enable-maintainer-mode ) during configuration, you will not contain reconfiguration rules.

+7
source

All Articles