Which processes in the autoconf and automake flowc

2019-09-19 05:34发布

问题:

In the flowchart of autoconf and automake from https://en.wikipedia.org/wiki/Automake , there are several processes

  • autoscan
  • alocal
  • autoheader
  • autoconf
  • automake
  • configure
  • make

Which processes are performed

  • by a user of a software program after he downloaded the distribution of the software program
  • by the party who creates the distribution of the software program from its source code (and who is likely the author of the software program)?

I ask this question, because I remember that after I, as a user of some software program, downloaded its source distribution, the commands I ran to build an executable from the source distribution were autoconf, ./configure, and make. So I guess that the other processes in the flowchart had been performed during the creation of the distribution by the author of the software program. Am I correct?

Thanks.

回答1:

Which processes are performed by a user of a software program after he downloaded the distribution of the software program

It depends on what you want to do. Lots of people are only after the basic build commands to configure, build, and install the software package:

# ./configure; make; make install

and you'll not need to invoke autoreconf, autoconf, automake in those cases, even if you're patching source. If the modifications are extensive enough to need to modify configure.ac or Makefile.am files, then maybe the other tools will need to be invoked. Often configure is smart enough to automatically invoke them on your behalf.

autoscan is really only useful for for porting your software package to the GNU Build System. The same for autoheader. Once you've got a basic configure.ac and config.h.in you're not going to be needing those tools again. These tools are nice, but not required to produce the aforementioned files.

Which processes are performed by the party who creates the distribution of the software program from its source code (and who is likely the author of the software program)?

If you have some kind of automated software build, I'd imagine it'd invoke autoreconf -fvi and possibly a few other steps after a fresh checkout from a VCS. That's why there are bootstrap.sh or autogen.sh scripts. That basically invokes aclocal, autoconf and automake to write configure. Then basically configure; make distcheck; to make the distribution.