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

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 閱讀(1732) 評論(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>
            欧美成人国产| 欧美区高清在线| 国产免费一区二区三区香蕉精| 日韩视频在线播放| 亚洲国产成人不卡| 免费在线亚洲欧美| 亚洲国产精品精华液网站| 欧美第一黄网免费网站| 免费欧美日韩国产三级电影| 亚洲免费观看在线视频| 亚洲乱码日产精品bd| 欧美视频亚洲视频| 欧美一区二区三区在线看| 欧美中文字幕久久| 一区二区三区亚洲| 亚洲激情视频网站| 国产精品久久久一区二区| 香蕉国产精品偷在线观看不卡| 欧美一区二区三区精品| 亚洲韩国日本中文字幕| 亚洲毛片在线观看.| 国产精品日韩一区二区三区| 男人的天堂亚洲| 欧美日韩hd| 久久人人97超碰精品888| 猫咪成人在线观看| 亚洲男人av电影| 久久久久综合| 亚洲在线1234| 奶水喷射视频一区| 午夜精品成人在线| 欧美成人综合网站| 久久久精品性| 欧美色网一区二区| 欧美电影在线| 国产精品区一区| 亚洲欧洲日产国产网站| 韩国女主播一区| 日韩午夜免费| 亚洲欧洲精品一区二区三区波多野1战4 | 亚洲免费视频观看| 久久人91精品久久久久久不卡| 日韩亚洲欧美在线观看| 久久精品亚洲精品国产欧美kt∨| 99re热精品| 老司机久久99久久精品播放免费 | 狠狠色狠色综合曰曰| 最近中文字幕日韩精品| 精品二区视频| 欧美亚洲一区在线| 欧美一级黄色网| 欧美午夜一区二区| 亚洲欧洲在线看| 亚洲国产欧美一区二区三区丁香婷| 亚洲欧美区自拍先锋| 一区二区欧美视频| 欧美护士18xxxxhd| 亚洲电影免费观看高清| 激情五月综合色婷婷一区二区| 午夜视频一区| 久久不射电影网| 国产免费成人| 亚洲一区图片| 欧美在线观看一二区| 国产精品久在线观看| 亚洲视频观看| 午夜在线观看欧美| 国产精品永久免费视频| 亚洲一级黄色| 久久精品国产免费| 国产一区二区三区高清在线观看| 亚洲一区二区三区成人在线视频精品| 在线中文字幕一区| 欧美日韩精品在线视频| 夜夜爽夜夜爽精品视频| 亚洲视频免费观看| 国产精品亚洲欧美| 久久国产免费看| 免费在线观看一区二区| 亚洲国产精品黑人久久久 | 午夜精品久久99蜜桃的功能介绍| 午夜精品www| 国产在线一区二区三区四区| 久久爱www.| 欧美激情精品| 亚洲午夜久久久久久久久电影网| 欧美日韩一级大片网址| 亚洲免费在线视频| 老牛嫩草一区二区三区日本| 亚洲国产精品久久久久| 欧美精品1区| 亚洲一品av免费观看| 久久久精品国产免大香伊| 亚洲第一中文字幕在线观看| 欧美精品粉嫩高潮一区二区| 一本大道久久精品懂色aⅴ| 欧美一区二区三区日韩视频| 韩国v欧美v日本v亚洲v| 欧美日韩成人一区二区三区| 亚洲一区国产视频| 欧美成ee人免费视频| 一本色道久久综合亚洲精品小说| 国产女同一区二区| 美女视频黄 久久| 在线一区观看| 欧美成人一区二区| 午夜激情综合网| 亚洲国产精品美女| 国产精品久久福利| 欧美成人网在线| 亚洲免费一级电影| 亚洲国产专区| 噜噜噜在线观看免费视频日韩| 亚洲人久久久| 狠狠色噜噜狠狠色综合久| 欧美日韩国产在线播放| 久久久久久久久综合| 一区二区三区毛片| 亚洲电影欧美电影有声小说| 香蕉免费一区二区三区在线观看 | 香蕉久久久久久久av网站| 亚洲人成在线免费观看| 国产日韩在线视频| 国产精品高潮呻吟久久| 欧美黄污视频| 久久中文精品| 久久久久99| 午夜精品成人在线| 在线亚洲观看| 亚洲免费av网站| 亚洲国产日韩在线| 欧美成人黑人xx视频免费观看| 欧美一级大片在线观看| 亚洲在线黄色| 亚洲一区二区三区精品视频| 亚洲美女尤物影院| 亚洲国产欧美日韩| 亚洲国产精品t66y| 亚洲第一搞黄网站| 在线免费观看日本欧美| 国模精品娜娜一二三区| 国产一区二区三区奇米久涩 | 久久精选视频| 久久xxxx精品视频| 久久精品国产欧美亚洲人人爽| 亚洲一级在线观看| 亚洲欧美在线播放| 亚洲字幕一区二区| 亚洲免费在线视频一区 二区| 亚洲综合欧美日韩| 午夜精品久久久久久久99水蜜桃| av成人免费观看| 一区二区免费在线视频| 亚洲视频1区| 亚洲一区二区不卡免费| 亚洲永久免费精品| 欧美一区在线看| 久久亚洲精品中文字幕冲田杏梨| 久久精品国产综合| 久久人人爽爽爽人久久久| 老司机精品视频网站| 男女精品网站| 国产精品va| 国外成人网址| 亚洲黄色有码视频| 一区二区三区四区在线| 亚洲欧美久久久| 久久婷婷麻豆| 91久久极品少妇xxxxⅹ软件| 一区二区av在线| 亚洲欧美国产日韩天堂区| 欧美一区二区三区在| 老司机免费视频一区二区| 欧美久色视频| 国产日产欧美a一级在线| 激情五月***国产精品| 日韩一级裸体免费视频| 香蕉久久一区二区不卡无毒影院 | 亚洲香蕉伊综合在人在线视看| 午夜精品福利一区二区三区av| 久久久国产一区二区| 欧美日韩国产一区精品一区 | 在线播放豆国产99亚洲| 日韩天堂av| 欧美在线影院| 亚洲激情中文1区| 午夜国产一区| 欧美日本国产视频| 国产手机视频精品| 一本色道久久88综合日韩精品 | 亚洲欧美中文日韩在线| 久久三级视频| 正在播放欧美视频| 老司机免费视频一区二区三区 | 久久久免费精品视频| 欧美视频一区二区在线观看| 1024欧美极品| 久久久精品国产99久久精品芒果| 亚洲激情视频在线| 久久xxxx|