我們在網上經常可以看到c/c++開源的項目,其中很多都是使用GNU的構建系統進行配置和編譯的,如果按照規范構造這些的步驟,有一定的門檻和復雜度,下文把關於auotools系列的工具和概要的流程簡要匯總一下,這樣我們就知道整個的構建系統是咋回事了。
If you’re writing open source software that targets Unix or Linux systems, you should absolutely be using the GNU Autotools, and even if you’re writing proprietary software for Unix or Linux systems, you’ll still benefit significantly from using them. The Autotools provide you with a build environment that will allow your project to build successfully on future versions or distributions with virtually no changes to the build scripts. This is useful even if you only intend to target a single Linux distribution, because—let’s be honest—you really can’t know in advance whether or not your company will want your software to run on other platforms in the future.
GNU Coding Standards (GCS) http://www.gnu.org/prep/standards/
Filesystem Hierarchy Standard (FHS) http://www.pathname.com/fhs/
The GNU Autotools framework includes three main packages: Autoconf, Automake, and Libtool.
Ø automake
Ø aclocal
以上可建,使用這個構建系統還是有些復雜,不過在當時GNU的初始階段還是起到很到的作用的。
如果想用更簡單的工具,還有cmake等,後文再講。