问题
Currently, our installation instructions are:
autoreconf -fi
./configure
...
The autoreconf
step generates the configure
file from configure.ac
and Makefile.in
from Makefile.in
. If one of the dependencies (say pkg-config
) is not installed, both configure
and autoreconf
fail although the latter prints a cryptic error message.
When releasing source tarballs, should the configure
script be supplied in the package or not? What other files need to be included if it has to be distributed? The directories build-aux
and autom4te.cache
and files aclocal.m4
were also created.
回答1:
In an SCM repository, nothing autogenerated should be present (including configure — but developer opinions digress here). A tarball should contain the state after autoreconf -fi
and/or autogen.sh
(or whichever name you chose for it). Third, you could also use make dist
, though it requires that all files that shall appear in the tarball are also listed in the Makefiles.
回答2:
Your installation instructions are horribly broken. The user should not need to have the autotool chain installed to build your software. You must distribute the configure script in your tarball. Note that you should not include the configure script in your version control system. (You should not use your version control system as a distribution system.)
回答3:
The configure script should be built by the maintainer and distributed in the tarball. End users should never have to touch it, and it is a good idea to ensure this via AM_MAINTAINER_MODE
if you are using automake. If not, make sure your Makefile.in
doesn't re-generate configure
when running for end users.
Let automake
generate a distribution for you if you want to know what else belongs there. The auxiliary directory build-aux
and aclocal.m4
do, automat4e.cache
doesn't.
来源:https://stackoverflow.com/questions/8865093/should-a-configure-script-be-distributed-if-configure-ac-is-available