天天看點

圖解autoscan、aclocal、autoheader、automake、autoconf、configure、make

1.autoscan (autoconf): 掃描源代碼以搜尋普通的可移植性問題,比如檢查編譯器,庫,頭檔案等,生成檔案configure.scan,它是configure.ac的一個雛形。

    your source files --> [autoscan*] --> [configure.scan] --> configure.ac

2.aclocal (automake):根據已經安裝的宏,使用者定義宏和acinclude.m4檔案中的宏将configure.ac檔案所需要的宏集中定義到檔案 aclocal.m4中。aclocal是一個perl 腳本程式,它的定義是:“aclocal - create aclocal.m4 by scanning configure.ac”

4.automake: automake将Makefile.am中定義的結建構立Makefile.in,然後configure腳本将生成的Makefile.in檔案轉換為Makefile。如果在configure.ac中定義了一些特殊的宏,比如AC_PROG_LIBTOOL,它會調用libtoolize,否則它會自己産生config.guess和config.sub

5.autoconf:将configure.ac中的宏展開,生成configure腳本。這個過程可能要用到aclocal.m4中定義的宏。

繼續閱讀