GNU Make 指南

The GNU make book

John Graham-Cumming · 初版 2015 年

6人推荐
9位读者提及
12次提及

“涵盖从基础到高级主题的 GNU Make 内容,包括:用户自定义函数、宏以及路径处理;创建 makefile 断言与调试 makefile;并行化;自动依赖生成、重建目标与非递归 Make;以及使用 GNU Make Standard Library”——

Hacker News 上怎么说

  • GNU Make 的官方手册非常优秀。如果要学进阶技巧:推荐 John Graham-Cumming 的《The GNU Make Book》。

    The GNU Make manual is excellent. For learning advanced techniques: "The GNU Make Book" by John Graham-Cumming.

  • John,虽然这篇 HN 帖子主要是关于 GMSL 的,但我想借此机会感谢你写了《The GNU Make Book》[0]。它真是一座宝藏,极大地提升了我使用 GNU Make 的能力。阅读那本书并折腾 GMSL 的经历,是我受到启发开始……的火花之一。

    John, Even though this HN post is about GMSL specifically, I want to use it to thank you for writing "The GNU Make Book"[0]. It was a veritable treasure trove that greatly increased my competency with GNU Make. The experience of using that book, and playing with GMSL, was one of the sparks that inspired me to start…

  • John Graham-Cumming 写的《GNU Make Book》https://nostarch.com/gnumake

    "GNU Make Book" by John Graham-Cumming https://nostarch.com/gnumake

  • ……已经差不多一年了。(其他工具像 Travis-CI 在它 EOL 之前一直默认使用它)。哦,如果你喜欢 gmsl,可能也会喜欢同一位作者('jgrahamc)写的书《The GNU Make Book》。gmsl 里有些东西确实算得上黑魔法(hacks),但如果你把 Make 宏看作“只是多了一堆美元符号和逗号的 lisp”,很多代码其实相当合情合理。

    …for almost a year now. (And others, such as Travis-CI, used it by default right up until it was EOL). Oh, if you appreciate gmsl, you might also appreciate a book by the same author ('jgrahamc), The GNU Make Book. Some of the things in gmsl are certainly hacks, but a lot of it is quite reasonable if you start reading Make macros as "lisp, but with a bunch of extra dollar-signs and commas".

  • ……折腾了十年各种光鲜的新构建工具后,我终于学会了不再担忧,爱上这枚炸弹(make)。它虽然古怪又充满硬伤,但能力出奇地强。值得投入时间去学。对了,jgrahamc 的《GNU Make Book》写得棒极了。[2] [0] https://github.com/apenwarr/redo [1] https://groups.google.com/forum/#!forum/redo-list [2] https://www.nostarch.com/gnumake

    …decade of messing with shiny new build tools, I finally learned to stop worrying and love the bomb (make). It's weird and warty but surprisingly capable. Worth the learning investment. Oh and jgrahamc's "GNU Make Book" is great. [2] [0] https://github.com/apenwarr/redo [1] https://groups.google.com/forum/#!forum/redo-list [2] https://www.nostarch.com/gnumake

  • ……默认使用文件修改时间戳来触发操作。但这绝对不是唯一的办法,你完全可以编写 Makefile 让它在文件 checksum 变化时才重新构建。如果我没记错的话,《GNU Make Book》里已经有现成的代码供你参考了……或者,你还可以更聪明一点,比如“当仅仅修改了注释时,我不想重新构建”;这种情况下文件 checksum 就不是合适的解法了,所以你可以……

    …by default uses the file change timestamp to trigger actions. But this is definitely not the only way, and you can code your Makefile so that rebuilds happen when a file's checksum changes. IIRC, the GNU Make Book has the code ready for you to study... Or, you might get more clever and say "when only a comment is changed, I don't want to rebuild"; file checksums are not the correct solution for this, so you can…

正在加载完整评论……

键盘快捷键

/
聚焦搜索框
j / k
下一本 / 上一本
Enter
打开选中的书
Esc
关闭 / 返回
g h
回到首页
g b
值得读精选
g t
历史总榜
g r
上升最快
g l
我的书架
?
显示本帮助