Files used in preparing a software package for distribution, when using just Autoconf:
your source files --> [autoscan*] --> [configure.scan] --> configure.ac
configure.ac --.
| .------> autoconf* -----> configure
[aclocal.m4] --+---+
| `-----> [autoheader*] --> [config.h.in]
[acsite.m4] ---'
Makefile.in
Additionally, if you use Automake, the following additional productions come into play:
[acinclude.m4] --.
|
[local macros] --+--> aclocal* --> aclocal.m4
|
configure.ac ----'
configure.ac --.
+--> automake* --> Makefile.in
Makefile.am ---'
Files used in configuring a software package:
.-------------> [config.cache]
configure* ------------+-------------> config.log
|
[config.h.in] -. v .-> [config.h] -.
+--> config.status* -+ +--> make*
Makefile.in ---' `-> Makefile ---'
begin:
hello.c--->[autoscan]--->hello.c autoscan.log configure.scan--->[mv configure.scan configure.ac]--->[vi configure.ac]--->[aclocal]--->aclocal.m4 autom4te.cache hello.c autoscan.log configure.scan---[autoconf]--->aclocal.m4 autom4te.cache hello.c autoscan.log configure.scan configure--->[autoheader]--->多出了config.h.in--->[vi Makefile.am]--->[touch NEWS README AUTHORS ChangLog]--->[automake --add-missing]--->多出了COPYING INSTALL missing depcomp install-sh NEWS README AUTHORS ChangLog Makefile.in --->[./configure]--->多出了config.log config.status Makefile config.h---->[make]--->多出了hello hello.o--->[sudo make install]--->make dist(打包).
注:[]表示命令,其余表示目录下
configure.ac代码如下: Makefile.in代码如下: