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

sunrise

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

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

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

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

2.aclocal (automake):根據(jù)已經(jīng)安裝的宏,用戶定義宏和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): 根據(jù)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中定義的結(jié)構(gòu)建立Makefile.in,然后configure腳本將生成的Makefile.in文件轉(zhuǎn)換 為Makefile。如果在configure.ac中定義了一些特殊的宏,比如AC_PROG_LIBTOOL,它會調(diào)用libtoolize,否則它 會自己產(chǎn)生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/目錄下創(chuàng)建一個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

已經(jīng)生成了configure.scan,autoscan.log文件

將configure.scan 修改為 configure.in,最后修改的內(nèi)容如下:

[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 (根據(jù) 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 (根據(jù) 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
轉(zhuǎn)自:http://hi.baidu.com/litaosmile/blog/item/0c5562139fe5ced9f6039ee3.html




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

評論

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

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            久久久久久亚洲精品杨幂换脸| 欧美国产日韩一区| 国产精品视频一区二区三区| 亚洲香蕉网站| 亚洲一区二区三区三| 国产女人aaa级久久久级| 久久国产精品高清| 久久电影一区| 91久久精品久久国产性色也91| 亚洲第一视频网站| 欧美日韩喷水| 欧美一区二区三区视频免费| 午夜亚洲福利| 亚洲激情视频网站| 正在播放亚洲一区| 激情综合色丁香一区二区| 欧美a级一区二区| 欧美日韩一区二区国产| 午夜一区不卡| 女女同性精品视频| 亚洲欧美另类国产| 久久精品成人| 一区二区三区国产在线| 亚洲欧美国产精品va在线观看| 黄色亚洲大片免费在线观看| 最新中文字幕一区二区三区| 国产精品久久久久久久7电影 | 欧美日韩一区高清| 久久激情视频免费观看| 欧美+日本+国产+在线a∨观看| 一区二区高清| 久久久久**毛片大全| avtt综合网| 久久精品免费播放| 亚洲一区www| 美脚丝袜一区二区三区在线观看 | 久久精品国产久精国产爱| 免费观看成人www动漫视频| 亚洲一区日韩在线| 六月丁香综合| 久久久7777| 欧美日韩国产精品| 免费永久网站黄欧美| 欧美性视频网站| 欧美福利电影在线观看| 国产精品一区二区久久国产| 亚洲国产小视频| 国产一区亚洲一区| 亚洲视频免费| 99伊人成综合| 免费中文日韩| 美女在线一区二区| 国产色产综合色产在线视频| 99精品国产在热久久婷婷| 伊人久久av导航| 欧美一级淫片aaaaaaa视频| 亚洲在线第一页| 欧美日韩免费一区二区三区| 欧美激情区在线播放| 黄色精品一区| 久久久久久**毛片大全| 欧美在线一二三区| 国产精品视频自拍| 99视频精品| 亚洲视频电影图片偷拍一区| 欧美精品一区二区三区久久久竹菊 | 亚洲美女在线看| 99国内精品久久久久久久软件| 久久久777| 久久综合色影院| 国内精品视频在线观看| 久久精品人人爽| 狼人天天伊人久久| 亚洲高清一区二| 麻豆国产精品777777在线| 欧美激情在线免费观看| 日韩视频一区二区三区在线播放免费观看 | 国产精品激情电影| 中文av字幕一区| 性久久久久久| 激情久久影院| 免费观看日韩av| 亚洲欧洲日本mm| 亚洲欧美国产精品桃花| 国产日韩精品入口| 久久午夜国产精品| 亚洲激情在线| 亚洲一区二区三区精品动漫| 国产精品系列在线播放| 久久精品久久99精品久久| 欧美高清在线精品一区| 日韩视频在线一区二区| 国产精品av免费在线观看| 午夜精品久久久久久久99黑人| 久久蜜桃精品| 亚洲精选视频在线| 国产精品美女一区二区| 欧美一区二区视频在线观看2020 | 亚洲砖区区免费| 国产一区自拍视频| 欧美大片在线观看| 亚洲一区二区三区乱码aⅴ蜜桃女 亚洲一区二区三区乱码aⅴ | 久久久国产午夜精品| 亚洲国产视频直播| 欧美亚洲一级| 亚洲美女黄网| 国产午夜亚洲精品不卡| 欧美1区视频| 午夜天堂精品久久久久| 亚洲韩日在线| 久久影视三级福利片| 一区二区三区.www| 精品动漫3d一区二区三区免费 | 午夜精品免费在线| 亚洲国产另类久久精品| 久久国产精品99精品国产| 99成人免费视频| 韩日欧美一区二区| 国产精品日韩一区| 欧美精品一区二区三区蜜臀 | 亚洲午夜未删减在线观看| 欧美第一黄色网| 欧美综合国产精品久久丁香| 日韩亚洲不卡在线| 一区精品在线| 国产一区视频在线观看免费| 欧美三级视频在线| 欧美人与性动交cc0o| 久久久在线视频| 欧美一区二区三区免费观看视频| 一本色道久久99精品综合| 亚洲电影一级黄| 欧美不卡福利| 美女成人午夜| 久久综合激情| 久久精品国产欧美亚洲人人爽| 亚洲一区二区欧美日韩| 日韩亚洲不卡在线| 亚洲精品久久久久久久久| 亚洲福利视频一区二区| 狠狠噜噜久久| 曰韩精品一区二区| 尹人成人综合网| 永久91嫩草亚洲精品人人| 激情综合网址| 一区二区在线不卡| 亚洲二区免费| 亚洲人成在线影院| 亚洲黄色一区| 亚洲精选大片| 中文国产亚洲喷潮| 亚洲永久精品大片| 午夜免费日韩视频| 亚洲欧美一区二区三区久久| 亚洲欧美日本伦理| 午夜精品久久一牛影视| 久久av一区| 久久综合色综合88| 欧美www在线| 亚洲精品123区| 一本色道久久综合亚洲91| 亚洲午夜激情免费视频| 亚洲女同同性videoxma| 欧美中文在线免费| 另类欧美日韩国产在线| 欧美成人一区二免费视频软件| 欧美激情综合| 国产精品日韩精品欧美在线| 国产一区在线播放| 亚洲精品一区二区三| 亚洲欧美国产精品va在线观看| 久久精品99久久香蕉国产色戒| 农村妇女精品| aaa亚洲精品一二三区| 欧美亚洲在线观看| 免费影视亚洲| 国产精品久久久一区麻豆最新章节| 国产午夜精品久久久| 亚洲日本成人| 欧美一级播放| 欧美成人中文字幕在线| 在线视频日韩精品| 久久精品亚洲精品| 欧美日韩在线视频一区二区| 国产一区二区丝袜高跟鞋图片| 日韩小视频在线观看| 久久电影一区| 亚洲国产老妈| 久久精品视频在线看| 国产精品久久| 亚洲国产精品女人久久久| 亚洲欧美制服中文字幕| 亚洲高清不卡在线观看| 午夜一区二区三视频在线观看 | 亚洲一区亚洲| 麻豆精品在线播放| 国产欧美日韩亚洲精品| 一本大道久久a久久综合婷婷| 久久大香伊蕉在人线观看热2| 亚洲精品免费在线|