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

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>
            欧美一区成人| 免播放器亚洲| 国产一区二区三区在线免费观看 | 久久国产精品高清| 亚洲视频欧美在线| 国产精品99久久久久久久久| 一区二区高清在线| 一区二区三区成人| 亚洲免费视频在线观看| 久久精品一区蜜桃臀影院| 久久精品青青大伊人av| 欧美大色视频| 亚洲一区二区三区精品视频 | 亚洲第一区色| 免费视频一区二区三区在线观看| 9人人澡人人爽人人精品| 99国产精品| 欧美一区中文字幕| 欧美午夜国产| 亚洲肉体裸体xxxx137| 欧美一级片一区| 亚洲人成毛片在线播放| 香蕉av福利精品导航| 欧美日韩成人激情| 在线观看欧美日韩| 久久激情视频久久| 一区二区高清在线| 欧美日本国产一区| 亚洲国产精品一区二区三区| 欧美一区二区三区免费视频| 中文网丁香综合网| 国产精品久久久久久模特| 亚洲一卡久久| 亚洲一区免费网站| 国产精品一区二区久久久久| 亚洲午夜激情免费视频| 91久久精品www人人做人人爽| 久久久久国产精品一区三寸| 极品日韩av| 亚洲福利视频专区| 欧美日韩免费观看一区| 一区二区三区国产| 亚洲一区中文字幕在线观看| 国产精品亚洲综合一区在线观看| 亚洲欧美日韩爽爽影院| 欧美亚洲一区在线| 亚洲国产综合视频在线观看| 欧美激情一区二区在线| 亚洲成人中文| 欧美日韩在线不卡一区| 久久久久久久久久久成人| 欧美一区二区高清| 亚洲欧洲午夜| 亚洲一区欧美二区| 亚洲国内自拍| 久久嫩草精品久久久久| 日韩午夜av| 麻豆精品91| 免费观看成人www动漫视频| 国产精品高潮在线| 亚洲精品女人| 国内一区二区三区| 亚洲欧美日韩电影| 午夜精品一区二区三区在线 | 亚洲国产日韩欧美| 国产毛片精品视频| 亚洲视屏在线播放| 日韩网站在线| 欧美先锋影音| 在线视频欧美日韩| 亚洲一区二区少妇| 国产精品卡一卡二| 亚洲欧美成人一区二区三区| 亚洲女性裸体视频| 国产精品一区二区视频| 午夜视频一区二区| 欧美jizz19性欧美| 亚洲国产精品小视频| 欧美国产视频日韩| 99在线|亚洲一区二区| 亚洲在线1234| 禁断一区二区三区在线| 欧美国产精品v| 最新国产成人av网站网址麻豆| 久久精品国产欧美亚洲人人爽| 久久视频这里只有精品| 亚洲国产日韩欧美在线99| 欧美视频网址| 久久久久久久久久久久久9999| 91久久精品国产91久久性色tv| 亚洲美女尤物影院| 国内精品视频在线播放| 欧美日韩aaaaa| 久久成人人人人精品欧| 亚洲欧洲综合| 嫩草伊人久久精品少妇av杨幂| 中文精品99久久国产香蕉| 国产在线视频欧美| 国产精品丝袜xxxxxxx| 欧美喷潮久久久xxxxx| 狂野欧美激情性xxxx| 亚洲一区在线播放| 亚洲少妇自拍| 亚洲午夜精品国产| 国产精品99久久久久久久久| 欧美成人免费播放| 嫩草国产精品入口| 男女视频一区二区| 亚洲国产精品成人| 蜜桃久久av一区| 欧美~级网站不卡| 久久综合电影| 麻豆亚洲精品| 欧美精品在线免费| 国产精品乱码人人做人人爱| 欧美经典一区二区三区| 欧美日韩亚洲视频一区| 欧美三级第一页| 国产美女精品人人做人人爽| 国产精品嫩草影院av蜜臀| 国产精品永久在线| 国内精品久久久久久久97牛牛| 国产日韩精品一区二区| 国产毛片精品国产一区二区三区| 99在线精品观看| 性久久久久久久久久久久| 亚洲网友自拍| 久久精品国产久精国产思思| 免费成人黄色av| 欧美性色aⅴ视频一区日韩精品| 欧美日韩精品一区二区三区| 国产精品成人午夜| 在线观看亚洲视频| 亚洲女性裸体视频| 亚洲久久一区| 欧美a级一区| 樱桃成人精品视频在线播放| 一本一本大道香蕉久在线精品| 欧美一区二区三区在| 宅男精品视频| 欧美午夜一区二区| 亚洲精品乱码视频| 久久久久国产一区二区| 亚洲校园激情| 欧美日韩在线高清| 99国产精品久久| 亚洲日本成人| 欧美日本在线视频| 中文在线一区| 国产日韩精品一区观看| 久久精品视频在线免费观看| 亚洲欧洲99久久| 国内免费精品永久在线视频| 久久精品一区中文字幕| 久久精品首页| 亚洲高清在线播放| 日韩午夜在线播放| 国产精品揄拍一区二区| 久久久久久久尹人综合网亚洲 | 亚洲日本一区二区三区| 欧美成年人视频网站| 日韩一级片网址| 亚洲综合三区| 亚洲国产精品精华液网站| 一本大道久久a久久综合婷婷| 一本色道88久久加勒比精品| 欧美视频一区在线观看| 久久精品女人的天堂av| 免费欧美日韩| 久久国产精品久久久久久久久久 | 久久人人97超碰国产公开结果| 欧美在线亚洲综合一区| 亚洲黄色影片| 欧美亚洲综合在线| 亚洲精选视频在线| 久久久99爱| 欧美一区二区三区久久精品 | 欧美一级在线播放| 亚洲九九精品| 欧美激情精品久久久久久免费印度| 欧美一区二区在线播放| 欧美视频免费在线观看| 亚洲日本在线观看| 亚洲美女在线看| 欧美另类变人与禽xxxxx| 免播放器亚洲| 日韩一级裸体免费视频| 欧美大片一区二区| 亚洲欧洲日本mm| 一本久道久久久| 国产精品捆绑调教| 亚洲男人av电影| 免费观看亚洲视频大全| 一区二区在线视频观看| 乱码第一页成人| 亚洲精品一区二区三| 亚洲伊人网站| 国产目拍亚洲精品99久久精品| 欧美一区影院| 亚洲精品视频在线观看网站|