2.4 Automake Development / Automake 的發展
By 1994, Autoconf was a solid framework for handling the differences between Unix variants. However, program developers still had to write large `Makefile.in' files in order to use it. The `configure' script generated by autoconf would transform the `Makefile.in' file into a `Makefile' used by the make program.
在 1994 年時,對於處理各 Unix 分支版本間的差異,Autoconf 已能提供一個完整並可靠的程式設計框架。然而,為了使用 Autoconf,程式設計師得寫幾個巨大的 `Makefile.in' 檔案。由 autoconf 產生出的 `configure' 指令稿會把 `Makefile.in' 轉換成給 make 程式使用的 `Makefile' 檔案。
A `Makefile.in' file has to describe how to build the program. In the Imake equivalent of a `Makefile.in', known as an `Imakefile', it is only necessary to describe which source files are used to build the program. When Imake generates a `Makefile', it adds the rules for how to build the program itself. Later versions of the BSD make program also include rules for building a program.
程式設計師得在 `Makefile.in' 中描述建置程式的方法。在 Imake 中,類似的工作由 `Imakefile' 擔當,但在 `Imakefile' 中只需要列出建置程式所需要的原始碼檔案。當 Imake 產生 `Makefile' 時,他會自動將所需的程式建置規則加進去。在比較晚近的 BSD make 中,也內含有建置程式用的建置規則。
Since most programs are built in much the same way, there was a great deal of duplication in `Makefile.in' files. Also, the GNU project developed a reasonably complex set of standards for `Makefile's, and it was easy to get some of the details wrong.
由於大部分的程式建置方法都一樣,因此在 `Makefile.in' 中有不少的內容是重複的。此外,GNU 計畫發展出了一組規範撰寫 `Makefile' 應依循的標準,這個標準相當的複雜,很容易把一些細節搞錯。
These factors led to the development of Automake. automake, like autoconf, is a program run by a developer. The developer writes files named `Makefile.am'; these use a simpler syntax than ordinary `Makefile's. automake reads the `Makefile.am' files and produces `Makefile.in' files. The idea is that a script generated by autoconf converts these `Makefile.in' files into `Makefile's.
這些種種不便開啟了 Automake 的發展,如同 autoconf 一樣,automake 也是給程式設計師使用的工具。程式設計師先用一套比一般的 `Makefile' 還精簡的語法撰寫 `Makefile.am' 檔案,接著執行 automake 來讀取 `Makefile.am' 並依據其內容產生 `Makefile.in' 檔。如此一來,所產生出來的 `Makefile.in' 檔便可以交給 autoconf 產生的指令稿來產生出 `Makefile' 檔案。
As with Imake and BSD make, the `Makefile.am' file need only describe the files used to build a program. automake automatically adds the necessary rules when it generates the `Makefile.in' file. automake also adds any rules required by the GNU `Makefile' standards.
就像 Imake 與 BSD make 一樣,在 `Makefile.am' 中只需要描述有哪些原始碼檔案會用來建置程式。在產生 `Makefile.in' 檔時 automake 會自動加入必要的規則,此外,automake 也會加入在 GNU 的 `Makefile' 標準中所要求的規則。
The first version of Automake was written by David MacKenzie in 1994. It was completely rewritten in 1995 by Tom Tromey.
第一版的 Automake 是 David MacKenzie 在 1994 年所撰寫。並在 1995 年,由 Tom Tromey 重新撰寫。
No comments:
Post a Comment