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

posts - 319, comments - 22, trackbacks - 0, articles - 11
  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理
Configure,Makefile.am, Makefile.in, Makefile文件之間關系
2009-08-12 12:14

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


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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精品视频免费观看视频| 欧美人与性动交a欧美精品| 欧美伊人久久久久久久久影院 | 欧美在线资源| 一本到高清视频免费精品| 国产真实乱子伦精品视频| 国产日韩欧美在线播放| 欧美午夜不卡在线观看免费| 欧美成人精品福利| 欧美精品麻豆| 欧美激情视频免费观看| 亚洲综合社区| 欧美在线一二三| 亚洲欧美日韩一区二区在线 | 亚洲视频在线免费观看| 亚洲三级视频| 亚洲午夜电影网| 亚洲午夜久久久久久久久电影院| 亚洲美女精品成人在线视频| 一本久久青青| 亚洲综合三区| 久久精品国产99精品国产亚洲性色| 欧美承认网站| 欧美一区二区精品久久911| 国内视频精品| 国产主播一区二区| 激情文学综合丁香| 亚洲成人中文| 亚洲午夜一区二区| 亚洲在线视频免费观看| 亚洲综合色丁香婷婷六月图片| 久久激情五月丁香伊人| 久久精品夜色噜噜亚洲aⅴ| 久久av在线| 欧美激情在线观看| 亚洲精品日韩在线观看| 日韩一级裸体免费视频| 91久久夜色精品国产网站| 亚洲国产成人在线| 99精品国产一区二区青青牛奶| 亚洲欧美综合国产精品一区| 午夜精品久久久久久久蜜桃app | 久久亚洲一区二区三区四区| 欧美日韩理论| 国产日韩欧美夫妻视频在线观看| 国产一区二区在线免费观看| 夜夜夜久久久| 欧美在线日韩| 欧美激情一二三区| 亚洲欧美日韩在线综合| 另类av导航| 国产精品xxxxx| 国产精品国色综合久久| 精品成人国产在线观看男人呻吟| 亚洲国产毛片完整版 | 国产精品入口麻豆原神| 亚洲电影免费观看高清完整版在线| 日韩视频在线一区| 欧美亚洲免费高清在线观看| 亚洲在线黄色| 欧美黄色成人网| 亚洲一卡二卡三卡四卡五卡| 久久精品在线| 欧美午夜片欧美片在线观看| 在线日韩中文| 欧美一区二区视频免费观看 | 亚洲一区三区视频在线观看| 美女主播一区| 久久亚洲综合色| 国产女精品视频网站免费 | 亚洲精品欧美专区| 久久一区二区三区av| 国产精品久久久久影院色老大| 韩国一区电影| 久久免费视频网站| 中文日韩欧美| 欧美日韩另类丝袜其他| 日韩视频免费观看| 美女视频黄免费的久久| 久久嫩草精品久久久精品| 国产日韩欧美亚洲| 亚洲在线观看免费视频| 日韩网站在线| 欧美日本在线视频| 亚洲一区二区视频在线| 亚洲精品国产精品国产自| 久色婷婷小香蕉久久| 亚洲国产精品福利| 欧美成人性网| 另类av一区二区| 亚洲精品久久视频| 欧美国产日本| 老色批av在线精品| 亚洲美女色禁图| 亚洲激情网址| 欧美成人精品| 亚洲午夜精品一区二区| 99re亚洲国产精品| 欧美风情在线观看| 宅男噜噜噜66一区二区| 亚洲精品综合精品自拍| 久久久99久久精品女同性| 亚洲三级色网| 亚洲韩国日本中文字幕| 欧美亚洲在线观看| 在线免费观看成人网| 欧美成人精品福利| 亚洲欧美日本国产有色| 好吊色欧美一区二区三区视频| 久久久国产一区二区| 香蕉久久a毛片| 在线精品国精品国产尤物884a| 欧美成人一区二免费视频软件| 一区二区高清视频在线观看| 久久免费国产| 国产精品99久久99久久久二8 | 久久精品一区| 毛片基地黄久久久久久天堂| 亚洲国产精品视频一区| 亚洲一区激情| 国际精品欧美精品| 欧美国产在线观看| 国产精品亚洲成人| 欧美成人午夜激情在线| 亚洲电影成人| 亚洲二区视频在线| 亚洲视频在线一区| 一区二区三区国产盗摄| 久久久久久网| 乱中年女人伦av一区二区| 国产午夜精品美女视频明星a级| 午夜亚洲伦理| 欧美激情第10页| 国产精品一区二区三区四区五区| 美女尤物久久精品| 欧美理论电影在线观看| 麻豆精品视频在线| 欧美啪啪成人vr| 久久亚洲一区二区| 国产欧美日本一区二区三区| 亚洲高清影视| 欧美国产日韩视频| 美女被久久久| 国产精品美女久久| 9色国产精品| 在线成人免费视频| 亚洲深夜影院| 亚洲一区二区三区免费观看| 久久激情五月丁香伊人| 亚洲小说春色综合另类电影| 久久国产精品久久w女人spa| 亚洲第一狼人社区| 久久激情中文| 午夜精品久久久久影视 | 久久久亚洲午夜电影| 激情欧美一区| 亚洲一区二区精品| 亚洲视频免费在线| 欧美一区午夜视频在线观看| 99ri日韩精品视频| 蜜桃av久久久亚洲精品| 久久国产精品久久精品国产| 欧美性天天影院| 亚洲精品乱码久久久久久日本蜜臀 | 欧美激情在线有限公司| 玖玖视频精品| 国产日韩精品一区二区三区| 亚洲精品国产欧美| 久久蜜臀精品av| 久久精品国产精品亚洲精品| 国产一区二区三区奇米久涩| 亚洲午夜电影网| 91久久国产自产拍夜夜嗨| 牛牛影视久久网| 久久国产视频网| 在线电影一区| 伊人精品视频| 亚洲九九九在线观看| 亚洲日本中文| 99视频精品在线| 亚洲视频网站在线观看| 欧美亚洲网站| 亚洲大片一区二区三区| 欧美v日韩v国产v| 欧美天堂亚洲电影院在线播放| 亚洲精品乱码久久久久久黑人 | 亚洲精品一区二区在线观看| 久久久精品2019中文字幕神马| 欧美电影资源| 99国产精品视频免费观看一公开| 欧美精品在线播放| 亚洲天堂成人| 久久精品视频在线观看| 欧美日韩午夜精品| 久久精品免费播放| 欧美成人情趣视频| 亚洲一区二区三区视频播放|