如何体验Autotools的乐趣?

发布于 2024-09-09 01:53:06 字数 657 浏览 4 评论 0原文

因此,几年前,我花了一些时间来理解 make,它得到了巨大的回报。编写小 makefile 来构建我的项目和自动化任务既有趣又高效。

当然,缺点是我的 makefile 过于具体,尤其是在涉及平台和库位置时。

因此,这就是人们告诉我“自动工具来救援!”的时候。当其他人这样做时,他们似乎确实做到了这一点(我喜欢下载一些东西并运行 configure && make && sudo make install 并看着它正常工作),但我可以不要把我的头缠在他们身上。

我查看了一些 configure.acMakefile.am 文件,但我只是不明白发生了什么。我不知道标识符的哪一部分是开发人员的选择,哪一部分对自动工具有意义。我不确定我是否理解整个流程以及 Makefile.in 的要点。我想我只是碰上了心理障碍,从我习惯的系统(make)转向比它高一两层的东西。

谁能给我指点一本可以教我使用自动工具的乐趣的教程或书籍(最好不是过于枯燥的书籍)?步骤是什么,如何使用它们,如何从头开始编写自己的 configure.acMakefile.am?告诉我如何高效并与他们一起享受乐趣?

So a couple years back I took some time to grok make, and it's paid off enormously. Writing little makefiles for building my projects and automating tasks is fun and productive.

The downside is, of course, that my makefiles are overspecific, especially when it comes to platforms and library locations.

So this is the point at which people tell me "autotools to the rescue!" And they certainly seem to do the trick when other people do them (I love downloading something and running configure && make && sudo make install and watching it just work), but I can't wrap my head around them.

I've looked in some configure.ac and Makefile.am files, and I just don't understand what's going on. I don't know what part of identifiers is developer's choice, and what part is meaningful to the autotools. I'm not sure I understand the entire flow and the point of Makefile.in. I think I'm just hitting a mental wall going from the system I'm used to (make) to something that's a layer or two above that.

Can anyone point me towards a tutorial or book (preferably not an overly dry one) that can teach me the joy of autotools? What the steps are, and how I can use them, how I can write my own configure.ac and Makefile.am from scratch? Show me how to be effective and have fun with them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

野却迷人 2024-09-16 01:53:06

我不确定您是否能享受构建系统的乐趣...您是否阅读过 Autotools 教程?

http://www.lrde.epita.fr/~adl/autotools.html

有各种关于 autotools 的资源,问题是它们往往不完整,有点过时等等...

最近的一个优秀文档是 Autotools Mythbuster,尽管它不是介绍:

http://www.flameeyes.eu/autotools-mythbuster/index.html

I am not sure you can have fun with build systems... Have you been reading the Autotools Tutorial?

http://www.lrde.epita.fr/~adl/autotools.html

There are various resources about autotools, the problem is they tend to be incomplete, a bit outdated etc...

One recent and excellent document is Autotools Mythbuster, although it's not an introduction:

http://www.flameeyes.eu/autotools-mythbuster/index.html

月隐月明月朦胧 2024-09-16 01:53:06

虽然我认为 elmarco 的答案中提到的 Alexandre Duret-Lutz 的 Autotools 教程是最好的,但您还应该了解 Goat Book:

http://sourceware.org/autobook/

它所处理的工具的版本相当旧,但它是一个很好的介绍,并且以逻辑顺序呈现。它也比教程更完整。在您完成本教程之后,它可能最好用作补充阅读材料。

更新
还有John Calcote 的书,它于 2010 年 8 月左右出版,非常好。我不确定整本书是否在该链接上在线,但至少有一部分是在线的。

Although I consider Alexandre Duret-Lutz's Autotools Tutorial, mentioned in elmarco's answer, to be the very best available, you should also know about the Goat Book:

http://sourceware.org/autobook/

The versions of the tools it deals with are rather old, but it's a nice introduction and it's presented in a logical order. It's also more complete than the Tutorial. It is perhaps best used as supplementary reading after you've worked through the Tutorial.

UPDATE
There's also John Calcote's book, it was published around August 2010 and it's really good. I'm not sure whether the whole book is online at that link, but at least part of it is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文