why is “autoreconf” not used often?

余生长醉 提交于 2019-12-06 17:19:23

问题


I am newbie of Autotools. From my understanding, one would use the following basic steps to build software using Autotools:

  1. autoreconf --install
  2. ./configure
  3. make

However, I noticed that most open source software packages (on Linux) does not need the step 1. They most time just need step 2 and 3 to build. It seems that they already are packaged with Makefile.in. I am wondering why? Do they manually code the Makefile.in, or the software developer uses autoreconf to generate the Makefile.in before creating the software package?

Thanks.


回答1:


The software developer who creates the tarball (or who checks out the sources from a version control system) will usually invoke autoreconf from a script called bootstrap.sh or autogen.sh which may do other stuff. autoreconf might be invoked by Makefile as well (like when configure.ac has changed).

Most users will never need to run autoreconf, even those who are making some modifications to source (e.g. patches). Only those who need to make modifications to the package itself (making changes to configure.ac and/or Makefile.am) will need autoreconf.




回答2:


Running autoreconf requires having the correct version of autotools installed already. This leads to a chicken-and-egg problem -- how do you get autotools installed in the first place? It also adds an extra dependency that most end-users don't really need.

As a result, most packagers run autoreconf before producing the source tarballs that they distribute. This means that if you download such a tarball, you can configure and build it without needing to install autotools first.



来源:https://stackoverflow.com/questions/19263899/why-is-autoreconf-not-used-often

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!