fbpx
维基百科

Automake

GNU Automake是一種編程工具,可以產生供make程式使用的Makefile,用來編譯程式。它是自由軟體基金會發起的GNU計劃的其中一項,作為GNU構建系統的一部分。automake所產生的Makefile符合GNU編程標準。

Automake
開發者GNU計劃
当前版本
  • 1.16.5 (2021年10月3日;穩定版本)[1]
源代码库
  • git.savannah.gnu.org/cgit/automake.git
操作系统跨平台
类型軟體開發工具
许可协议GNU通用公共许可证
网站https://www.gnu.org/software/automake/
Flow diagram of autoconf and automake

automake是由Perl語言所寫的,必須和GNU autoconf一併使用。automake包含了以下命令:

  • aclocal
  • automake

aclocal是個泛用的程式,對於autoconf使用者是相當有用的。舉例而言,GNU Compiler Collection使用aclocal,即使Makefile是手寫的。

就像autoconf,automake並非完全向下相容的。舉例而言,使用automake 1.4的專案可能不能使用automake 1.9。

方法 编辑

Automake目標是讓使用者透過高階語言來寫makefile,而不是透過純手工的方式來寫整個makefile。在簡單的情況下,它能提供:

  • 源檔案的列表
  • 傳給編譯器的命令行選項列表(比如標頭檔置於哪個路徑)
  • 傳給链接器的命令行選項列表(程式需要哪些程式庫以及它們的路徑)

經由這些資訊,Automake產生makefile能夠讓使用者:

  • 編譯程式
  • clean(清除,刪除編譯過程中所產生的檔案)
  • 將程式安裝於標準路徑
  • 將程式反安裝(從安裝的地方移除)
  • create a source distribution archive (commonly called a tarball)
  • test that this archive is self-sufficient, and in particular that the program can be compiled in a directory other than the one where the sources are deployed

依存性資訊的產生 编辑

Automake能夠自動生成依存性的資訊,因此,當一個源文件被修改,下次呼叫make命令的時候就會知道哪些源文件需要重新編譯。如果編譯器允許,Automake會試著讓依存性系統保持動態:無論何時源文件被編譯,都會要求編譯器重新產生依存性列表更新該文件的依存性。換句話說,依存性追蹤是編譯過程的一種邊際效應。

這企圖避免一些靜態依存性系統的問題,比如依存性只會在程式員開始專案時才會被偵測到。在這種情況下,如果源文件獲得一個新的依存性(例如,如果程式員增加了一個新的#include指令在C語言的源文件),這樣在真實的依存性和編譯系統所使用的依存性之間就會產生差異。程式員應該重新產生依存性,但很有可能忘了那樣做。在一般情況下,automake透過隨附的depcomp腳本生成依存性,這會適當的呼叫編譯器或是回到makedepend。如果gcc編譯器的版本夠新的話,automake將會inline依存性生成碼,直接呼叫gcc。

Libtool 编辑

Automake还可用来辅助库的编译,它可以自动生成调用Libtool的Makefile文件,从而使程序员避免了直接调用Libtool,而项目也可以从此可移植的库生成工具获益。

參見 编辑

參考資料 编辑

  • Gary V. Vaughan, Ben Elliston, Tom Tromey: Gnu Autoconf, Automake, and Libtool, Sams, ISBN 1-57870-190-2
  1. ^ automake-1.16.5 released. 2021年10月3日 [2021年10月6日] (英語). 
  2. ^ Jim Meyering. . [2021-10-03]. (原始内容存档于2021-10-04). 

外部連結 编辑

  • Online version of The Goat Book aka Autobook(页面存档备份,存于互联网档案馆
  • Autotoolset home page(页面存档备份,存于互联网档案馆
  • Article "" by Murray Cumming

教材 编辑

  • Tutorial for beginners "" by Sarah George
  • Tutorial "" by Eleftherios Gkioulekas
  • The "Autotools Tutorial(页面存档备份,存于互联网档案馆)" by Alexandre Duret-Lutz introduces Autoconf, Automake, Libtool, and Gettext.
  • Learning the GNU Development tools(页面存档备份,存于互联网档案馆

automake, 是一種編程工具, 可以產生供make程式使用的makefile, 用來編譯程式, 它是自由軟體基金會發起的gnu計劃的其中一項, 作為gnu構建系統的一部分, automake所產生的makefile符合gnu編程標準, 開發者gnu計劃当前版本1, 2021年10月3日, 穩定版本, 源代码库git, savannah, cgit, automake, git操作系统跨平台类型軟體開發工具许可协议gnu通用公共许可证网站https, software, automake, flow, diag. GNU Automake是一種編程工具 可以產生供make程式使用的Makefile 用來編譯程式 它是自由軟體基金會發起的GNU計劃的其中一項 作為GNU構建系統的一部分 automake所產生的Makefile符合GNU編程標準 Automake開發者GNU計劃当前版本1 16 5 2021年10月3日 穩定版本 1 源代码库git wbr savannah wbr gnu wbr org wbr cgit wbr automake wbr git操作系统跨平台类型軟體開發工具许可协议GNU通用公共许可证网站https www gnu org software automake Flow diagram of autoconf and automakeautomake是由Perl語言所寫的 必須和GNU autoconf一併使用 automake包含了以下命令 aclocal automakeaclocal是個泛用的程式 對於autoconf使用者是相當有用的 舉例而言 GNU Compiler Collection使用aclocal 即使Makefile是手寫的 就像autoconf automake並非完全向下相容的 舉例而言 使用automake 1 4的專案可能不能使用automake 1 9 目录 1 方法 1 1 依存性資訊的產生 1 2 Libtool 2 參見 3 參考資料 4 外部連結 4 1 教材方法 编辑Automake目標是讓使用者透過高階語言來寫makefile 而不是透過純手工的方式來寫整個makefile 在簡單的情況下 它能提供 源檔案的列表 傳給編譯器的命令行選項列表 比如標頭檔置於哪個路徑 傳給链接器的命令行選項列表 程式需要哪些程式庫以及它們的路徑 經由這些資訊 Automake產生makefile能夠讓使用者 編譯程式 clean 清除 刪除編譯過程中所產生的檔案 將程式安裝於標準路徑 將程式反安裝 從安裝的地方移除 create a source distribution archive commonly called a tarball test that this archive is self sufficient and in particular that the program can be compiled in a directory other than the one where the sources are deployed依存性資訊的產生 编辑 Automake能夠自動生成依存性的資訊 因此 當一個源文件被修改 下次呼叫make命令的時候就會知道哪些源文件需要重新編譯 如果編譯器允許 Automake會試著讓依存性系統保持動態 無論何時源文件被編譯 都會要求編譯器重新產生依存性列表更新該文件的依存性 換句話說 依存性追蹤是編譯過程的一種邊際效應 這企圖避免一些靜態依存性系統的問題 比如依存性只會在程式員開始專案時才會被偵測到 在這種情況下 如果源文件獲得一個新的依存性 例如 如果程式員增加了一個新的 include指令在C語言的源文件 這樣在真實的依存性和編譯系統所使用的依存性之間就會產生差異 程式員應該重新產生依存性 但很有可能忘了那樣做 在一般情況下 automake透過隨附的depcomp腳本生成依存性 這會適當的呼叫編譯器或是回到makedepend 如果gcc編譯器的版本夠新的話 automake將會inline依存性生成碼 直接呼叫gcc Libtool 编辑 Automake还可用来辅助库的编译 它可以自动生成调用Libtool的Makefile文件 从而使程序员避免了直接调用Libtool 而项目也可以从此可移植的库生成工具获益 參見 编辑 nbsp Free software主题 CMake qmake imake Flowtracer參考資料 编辑Gary V Vaughan Ben Elliston Tom Tromey Gnu Autoconf Automake and Libtool Sams ISBN 1 57870 190 2 automake 1 16 5 released 2021年10月3日 2021年10月6日 英語 引文格式1维护 未识别语文类型 link Jim Meyering automake 1 16 5 released stable 2021 10 03 原始内容存档于2021 10 04 外部連結 编辑Automake home page Online version of The Goat Book aka Autobook 页面存档备份 存于互联网档案馆 Autotoolset home page 页面存档备份 存于互联网档案馆 Article Using Automake and Autoconf with C by Murray Cumming教材 编辑 Tutorial for beginners Autotools Tutorial by Sarah George Tutorial Learning Autoconf and Automake by Eleftherios Gkioulekas The Autotools Tutorial 页面存档备份 存于互联网档案馆 by Alexandre Duret Lutz introduces Autoconf Automake Libtool and Gettext Learning the GNU Development tools 页面存档备份 存于互联网档案馆 取自 https zh wikipedia org w index php title Automake amp oldid 71569685, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。