青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

sunrise

每天不斷學習,才能不斷提升自己。

  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
  64 隨筆 :: 0 文章 :: 92 評論 :: 0 Trackbacks

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”
user input files   optional input     process          output files
================ ============== ======= ============

acinclude.m4 - - - - -.
V
.-------,
configure.ac ------------------------>|aclocal|
{user macro files} ->| |------> aclocal.m4
`-------'
3.autoheader(autoconf): 根據configure.ac中的某些宏,比如cpp宏定義,運行m4,聲稱config.h.in

user input files optional input process output files
================ ============== ======= ============

aclocal.m4 - - - - - - - .
|
V
.----------,
configure.ac ----------------------->|autoheader|----> autoconfig.h.in
`----------'

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

user input files   optional input   processes          output files
================ ============== ========= ============

.--------,
| | - - -> COPYING
| | - - -> INSTALL
| |------> install-sh
| |------> missing
|automake|------> mkinstalldirs
configure.ac ----------------------->| |
Makefile.am ----------------------->| |------> Makefile.in
| |------> stamp-h.in
.---+ | - - -> config.guess
| | | - - -> config.sub
| `------+-'
| | - - - -> config.guess
|libtoolize| - - - -> config.sub
| |--------> ltmain.sh
| |--------> ltconfig
`----------'

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

user input files   optional input   processes          output files
================ ============== ========= ============

aclocal.m4 ,autoconfig.h.in - - - - - - -.
V
.--------,
configure.ac ----------------------->|autoconf|------> configure
 
6. ./configure的過程

.-------------> [config.cache]
configure* --------------------------+-------------> config.log
|
[config.h.in] -. v .--> [autoconfig.h]
+-------> config.status* -+
Makefile.in ---' `--> Makefile
 
7. make過程
 
[autoconfig.h] -.
+--> make* ---> 程序
Makefile ---'
 
.---------,
config.site - - ->| |
config.cache - - ->|configure| - - -> config.cache
| +-,
`-+-------' |
| |----> config.status
config.h.in ------->|config- |----> config.h
Makefile.in ------->| .status|----> Makefile
| |----> stamp-h
| +--,
.-+ | |
| `------+--' |
ltmain.sh ------->|ltconfig|-------> libtool
| | |
`-+------' |
|config.guess|
| config.sub |
`------------'

.--------,
Makefile ------>| |
config.h ------>| make |
{project sources} ---------------->| |--------> {project targets}
.-+ +--,
| `--------' |
| libtool |
| missing |
| install-sh |
|mkinstalldirs|
`-------------'
實例
在/hello/目錄下創建一個hello.c文件,并編譯運行它:

#cd /hello/

(1) 編寫源文件hello.c:

#include<stdio.h> 
int main(int argc, char** argv)
{
printf("Hello, GNU!n");
return 0;
}

[litao@vm0000131 hello]$ ll
total 4
-rw-rw-r-- 1 litao litao 68 Aug 12 12:02 hello.c

一、autoscan

[litao@vm0000131 hello]$ autoscan
autom4te: configure.ac: no such file or directory
autoscan: /usr/bin/autom4te failed with exit status: 1
[litao@vm0000131 hello]$ ll
total 8
-rw-rw-r-- 1 litao litao   0 Aug 12 12:03 autoscan.log
-rw-rw-r-- 1 litao litao 457 Aug 12 12:03 configure.scan
-rw-rw-r-- 1 litao litao  68 Aug 12 12:02 hello.c

已經生成了configure.scan,autoscan.log文件

將configure.scan 修改為 configure.in,最后修改的內容如下:

[litao@vm0000131 hello]$ mv configure.scan configure.in    
[litao@vm0000131 hello]$ vim configure.in 

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([hello.c])
#AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(hello, 1.0)
# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_OUTPUT(Makefile)

二、acloacl

[litao@vm0000131 hello]$ aclocal 

生成 aclocal.m4 和 autom4te.cache (生成aclocal.m4的過程中涉及到configure.in)

[litao@vm0000131 hello]$ ll
total 44
-rw-rw-r-- 1 litao litao 31120 Aug 12 12:08 aclocal.m4
drwxr-xr-x 2 litao litao  4096 Aug 12 12:08 autom4te.cache
-rw-rw-r-- 1 litao litao     0 Aug 12 12:03 autoscan.log
-rw-rw-r-- 1 litao litao   496 Aug 12 12:08 configure.in
-rw-rw-r-- 1 litao litao    68 Aug 12 12:02 hello.c

三、antoconf

[litao@vm0000131 hello]$ autoconf
生成 configure (根據 configure.in, 和 aclocal.m4)
[litao@vm0000131 hello]$ ll
total 168
-rw-rw-r-- 1 litao litao  31120 Aug 12 12:08 aclocal.m4
drwxr-xr-x 2 litao litao   4096 Aug 12 12:11 autom4te.cache
-rw-rw-r-- 1 litao litao      0 Aug 12 12:03 autoscan.log
-rwxrwxr-x 1 litao litao 122297 Aug 12 12:11 configure
-rw-rw-r-- 1 litao litao    496 Aug 12 12:08 configure.in
-rw-rw-r-- 1 litao litao     68 Aug 12 12:02 hello.c

四、編寫Makefile.am:

AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c

五、automake

生成 Makefile.in, depcomp, install-sh, 和 missing (根據 Makefile.am, 和 aclocal.m4)

[litao@vm0000131 hello]$ automake
configure.in: required file `./install-sh' not found
configure.in: required file `./missing' not found
Makefile.am: required file `./depcomp' not found
[litao@vm0000131 hello]$ automake --add-missing
configure.in: installing `./install-sh'
configure.in: installing `./missing'
Makefile.am: installing `./depcomp'
[litao@vm0000131 hello]$ ll
total 192
-rw-rw-r-- 1 litao litao  31120 Aug 12 12:08 aclocal.m4
drwxr-xr-x 2 litao litao   4096 Aug 12 12:14 autom4te.cache
-rw-rw-r-- 1 litao litao      0 Aug 12 12:03 autoscan.log
-rwxrwxr-x 1 litao litao 122297 Aug 12 12:11 configure
-rw-rw-r-- 1 litao litao    496 Aug 12 12:08 configure.in
lrwxrwxrwx 1 litao litao     31 Aug 12 12:16 depcomp -> /usr/share/automake-1.9/depcomp
-rw-rw-r-- 1 litao litao     68 Aug 12 12:02 hello.c
lrwxrwxrwx 1 litao litao     34 Aug 12 12:16 install-sh -> /usr/share/automake-1.9/install-sh
-rw-rw-r-- 1 litao litao     69 Aug 12 12:15 Makefile.am
-rw-rw-r-- 1 litao litao  16561 Aug 12 12:16 Makefile.in
lrwxrwxrwx 1 litao litao     31 Aug 12 12:16 missing -> /usr/share/automake-1.9/missing

六、configure
生成 Makefile, config.log, 和 config.status
轉自:http://hi.baidu.com/litaosmile/blog/item/0c5562139fe5ced9f6039ee3.html




posted on 2012-06-27 10:31 SunRise_at 閱讀(1717) 評論(1)  編輯 收藏 引用 所屬分類: linux開發

評論

# re: Configure,Makefile.am, Makefile.in, Makefile文件之間關系 2012-06-29 11:36 zgpxgame
mark  回復  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            一区二区激情小说| 欧美精品日韩一本| 国产曰批免费观看久久久| 日韩亚洲在线| 一区二区三区www| 欧美日韩国产影院| 夜夜嗨av一区二区三区网站四季av| 亚洲国产精品成人综合色在线婷婷 | 亚洲欧美国产高清| 国产嫩草一区二区三区在线观看| 久久福利资源站| 午夜在线不卡| 亚洲国产欧美日韩精品| 亚洲精品少妇30p| 国产乱人伦精品一区二区| 久久久久久久综合色一本| 久久久久久电影| 一区二区精品国产| 久久精品免费电影| 日韩图片一区| 欧美在线91| 日韩一级黄色大片| 欧美一区二区三区免费看| 亚洲国产一区二区三区在线播| 日韩一级在线观看| 激情久久综合| 亚洲五月婷婷| 亚洲日本视频| 久久xxxx精品视频| 亚洲视频1区| 美女在线一区二区| 久久国产精品亚洲va麻豆| 欧美91精品| 久久国产婷婷国产香蕉| 欧美另类高清视频在线| 最新国产の精品合集bt伙计| 国产精品福利片| 欧美成人精品一区二区三区| 国产精品久久久久久久久免费| 另类专区欧美制服同性| 国产精品一区二区a| 亚洲国产精品va在看黑人| 国产一区视频网站| 一区二区三区四区五区在线 | 欧美一区二区视频在线| 亚洲最新视频在线播放| 久久久午夜视频| 亚洲欧美激情视频| 欧美精品免费在线观看| 欧美高清免费| 韩国av一区二区三区| 亚洲在线第一页| 亚洲一区二区三区在线| 欧美国产一区在线| 亚洲高清在线视频| 亚洲国产欧美在线人成| 久久永久免费| 美女任你摸久久| 韩国精品主播一区二区在线观看| 亚洲欧美国内爽妇网| 香蕉成人久久| 国产精品久久久久久久浪潮网站| 日韩视频在线一区| 亚洲天堂激情| 国产精品户外野外| 亚洲一区二区四区| 欧美在线高清| 国产亚洲日本欧美韩国| 欧美亚洲免费在线| 猫咪成人在线观看| 亚洲黄色av一区| 欧美精品一区二区三区在线看午夜 | 国产亚洲永久域名| 久久国产精品久久w女人spa| 久久久久一区二区三区| 一区二区三区在线视频播放| 久久偷看各类wc女厕嘘嘘偷窃| 久久亚洲私人国产精品va| 在线观看欧美| 欧美激情亚洲另类| 99精品国产福利在线观看免费 | 一区二区激情| 国产精品成人一区二区艾草| 亚洲一区日本| 久久久久久网| 亚洲精品一区二区三区不| 欧美三级第一页| 欧美一级在线视频| 亚洲第一页在线| 亚洲四色影视在线观看| 国产一区二三区| 欧美激情1区2区| 亚洲视频一区在线观看| 久久亚洲精品伦理| 日韩视频一区二区在线观看 | 亚洲裸体俱乐部裸体舞表演av| 一区二区激情| 国产一二精品视频| 欧美www视频在线观看| 一区二区三区|亚洲午夜| 久久久久一区二区| 亚洲图片激情小说| 极品日韩久久| 国产精品九色蝌蚪自拍| 久久久综合免费视频| 一区二区三区国产在线| 美国十次成人| 欧美一区二区视频97| 亚洲乱码精品一二三四区日韩在线 | 亚洲一区激情| 亚洲高清一区二| 久久久九九九九| 国产精品99久久久久久久久 | 欧美亚男人的天堂| 麻豆久久久9性大片| 亚洲在线免费| 亚洲精品视频在线观看网站| 老色鬼精品视频在线观看播放| 一本在线高清不卡dvd | 欧美日韩在线一区二区| 浪潮色综合久久天堂| 亚洲一区三区视频在线观看| 亚洲国产欧美在线| 麻豆亚洲精品| 久久久亚洲综合| 欧美一区二区三区四区在线观看 | 夜夜嗨av一区二区三区四区| 一区二区亚洲精品| 国产模特精品视频久久久久| 欧美日韩在线亚洲一区蜜芽| 欧美精品精品一区| 欧美黑人国产人伦爽爽爽| 久久精品综合| 久久精品视频在线观看| 欧美亚洲午夜视频在线观看| 亚洲在线观看免费| 亚洲综合欧美日韩| 亚洲综合成人在线| 亚洲欧美激情视频| 西西裸体人体做爰大胆久久久| 亚洲视频一区二区在线观看| 亚洲免费av电影| 99精品热视频| 在线视频日韩| 亚洲一区bb| 亚洲欧美日韩一区二区| 午夜激情一区| 久久精品国内一区二区三区| 久久国产66| 免费成人小视频| 欧美久久久久| 国产精品福利久久久| 国产精品一区二区欧美| 国产女人精品视频| 一区二区三区亚洲| 亚洲黄色成人久久久| 一本一道久久综合狠狠老精东影业 | 久久影院亚洲| 欧美成人免费在线观看| 欧美国产视频在线| 欧美午夜一区| 国产视频在线观看一区| 黄色国产精品一区二区三区| **性色生活片久久毛片| 亚洲精品欧美日韩专区| 亚洲在线播放| 久久手机精品视频| 亚洲国内高清视频| 亚洲欧美国产日韩天堂区| 久久免费国产| 欧美午夜宅男影院在线观看| 国产性猛交xxxx免费看久久| 亚洲高清在线视频| 亚洲一区在线直播| 美女国产一区| 亚洲最新合集| 久久一区二区三区四区| 欧美日韩一区在线观看视频| 国产在线日韩| 亚洲一级在线| 欧美激情区在线播放| 在线亚洲国产精品网站| 久久午夜国产精品| 国产精品日本一区二区 | 国产欧美婷婷中文| 亚洲日本va午夜在线影院| 亚洲欧美中文字幕| 亚洲国产99| 欧美在线观看日本一区| 欧美日韩一区二区三区在线看| 精品88久久久久88久久久| 亚洲视频欧美在线| 欧美国产第一页| 欧美一区二区免费| 欧美三级视频在线观看| 亚洲经典一区| 蜜桃久久精品乱码一区二区| 亚洲一区二区三区四区在线观看 | 欧美精品一区二区三区蜜臀| 一区二区三区在线不卡|