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

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>
            亚洲国产精品一区二区第四页av | 国产视频精品免费播放| 久久大逼视频| 久久成人免费视频| 久久久久久高潮国产精品视| 久久精品动漫| 久色成人在线| 欧美日韩在线免费观看| 欧美午夜精品理论片a级大开眼界 欧美午夜精品理论片a级按摩 | 韩日成人在线| 亚洲激情婷婷| 亚洲一区二区少妇| 欧美一区二区三区婷婷月色| 久久精品123| 欧美激情 亚洲a∨综合| 亚洲精选一区| 欧美在线综合| 欧美日韩不卡合集视频| 国产精品影视天天线| 亚洲电影网站| 亚洲欧美中文日韩v在线观看| 久久亚洲欧美| 亚洲精品视频在线播放| 午夜久久久久久久久久一区二区| 久久精品99国产精品| 欧美成人国产va精品日本一级| 欧美日韩亚洲综合一区| 国产一区在线观看视频| 亚洲麻豆av| 久久精品女人天堂| 亚洲美女淫视频| 久久久久www| 国产精品久久久久77777| 在线播放视频一区| 亚洲欧洲99久久| 亚洲激情网址| 久久久久久日产精品| 欧美日韩精品一区二区天天拍小说 | 一区二区激情小说| 久久久精品国产免大香伊| 亚洲一区美女视频在线观看免费| 国产精自产拍久久久久久| 亚洲精品一区二区在线观看| 欧美在线播放一区| 亚洲精品国精品久久99热一| 久久久精品一品道一区| 国产精品久久久久三级| 91久久精品国产91性色tv| 久久精品午夜| 亚洲伊人一本大道中文字幕| 欧美日韩激情网| 亚洲人成网站在线播| 蜜桃av噜噜一区| 欧美在线观看天堂一区二区三区| 国产精品久久久久9999| 在线亚洲欧美| 亚洲精品在线电影| 欧美精品激情在线| 日韩一区二区高清| 亚洲国产日韩综合一区| 欧美成人综合| 99精品免费网| 亚洲免费黄色| 国产精品高清网站| 亚洲欧美综合另类中字| 亚洲一区三区在线观看| 国产精品无码专区在线观看| 午夜免费在线观看精品视频| 亚洲一区久久久| 国产视频在线观看一区二区| 久久久久国产精品一区三寸| 久久精品国产亚洲精品| 亚洲国产精品精华液2区45| 欧美国产日韩一区二区三区| 久久―日本道色综合久久| 亚洲电影免费观看高清完整版| 欧美国产日韩二区| 欧美日韩福利| 欧美一二区视频| 欧美专区在线观看一区| 亚洲国产成人久久综合一区| 亚洲国产日韩在线一区模特| 国产精品久久久久久久久久久久| 久久国产毛片| 久久综合伊人77777蜜臀| 亚洲美女一区| 欧美一区成人| 99热这里只有精品8| 亚洲专区国产精品| 永久91嫩草亚洲精品人人| 亚洲国产精品va在线看黑人 | 久久麻豆一区二区| 亚洲精品一级| 亚洲视频播放| 伊人色综合久久天天五月婷| 91久久在线| 国产有码一区二区| 亚洲久久视频| 国产一区二区三区丝袜| 亚洲大片av| 国产乱人伦精品一区二区| 美女啪啪无遮挡免费久久网站| 欧美日韩精品二区| 欧美大胆成人| 国产乱码精品一区二区三区忘忧草 | 亚洲国产成人tv| 99精品视频免费观看| 狠狠色伊人亚洲综合网站色| 亚洲人成在线观看| 国产一区二区三区久久| 夜夜嗨av色综合久久久综合网| 亚洲第一网站| 亚洲女爱视频在线| 亚洲日本中文字幕免费在线不卡| 亚洲综合视频在线| 99综合在线| 狂野欧美激情性xxxx| 亚洲欧美在线免费| 欧美日韩成人在线| 欧美成人精品在线| 国产欧美91| 一本色道久久综合亚洲精品婷婷| 亚洲第一久久影院| 久久精品导航| 久久久精品一区| 国产精品综合久久久| 一区二区91| 亚洲一二三区在线| 欧美精品系列| 亚洲激情一区| 日韩视频第一页| 欧美黑人在线观看| 亚洲第一在线| 亚洲国产精品va在线观看黑人| 久久国产黑丝| 欧美在线地址| 国产免费观看久久黄| 亚洲午夜视频在线观看| 亚洲人体影院| 欧美精品久久久久久久久老牛影院 | 在线日韩精品视频| 久久一二三四| 欧美福利一区| 亚洲精品国产精品久久清纯直播| 久久久欧美精品| 欧美v日韩v国产v| 亚洲韩日在线| 欧美日产在线观看| 99re热精品| 欧美一区二区三区在线免费观看| 国产精品视频自拍| 欧美在线视频免费播放| 久久久久久午夜| 国产综合网站| 免费久久精品视频| 亚洲国产成人精品女人久久久| 亚洲人成亚洲人成在线观看| 欧美极品在线观看| 亚洲无线一线二线三线区别av| 性做久久久久久| 精品电影一区| 麻豆国产精品va在线观看不卡| 亚洲国产另类久久久精品极度| 亚洲色诱最新| 国产主播精品在线| 欧美国产日本| 亚洲一区二区三区四区视频| 久久这里有精品15一区二区三区| 亚洲人成网站在线播| 欧美三级精品| 欧美中文字幕在线视频| 欧美激情一区在线观看| 亚洲一区二区成人| 黄色成人av在线| 欧美大成色www永久网站婷| 一区二区欧美日韩视频| 久久成人羞羞网站| 99精品视频免费| 国产一区二区三区在线观看免费| 蜜桃av综合| 亚洲欧美国产精品专区久久| 欧美aa在线视频| 午夜伦理片一区| 99re热这里只有精品免费视频| 国产欧美日韩激情| 蜜桃精品一区二区三区 | 亚洲国产你懂的| 欧美一区日韩一区| 日韩午夜电影av| 好吊妞这里只有精品| 国产精品jizz在线观看美国| 久久一区视频| 欧美影视一区| 中文在线资源观看视频网站免费不卡| 久久一区二区三区国产精品| 亚洲一区二区三区四区在线观看| 在线免费一区三区| 国产视频一区二区三区在线观看| 欧美日韩久久精品| 欧美国产日韩a欧美在线观看|