makefile教程
Make is a utility that automatically builds executable programs and libraries from source code by reading files called makefiles which specify how to derive the target program. Make is widely used, especially in Unix/Linux world. More introductions to Make and it’s history can be found on Wikipedia.
Make是一个实用程序,可通过读取称为makefiles的文件来从源代码自动构建可执行程序和库,该文件指定如何派生目标程序。 Make被广泛使用,尤其是在Unix / Linux世界中。 有关Make及其历史的更多介绍可以在Wikipedia上找到。
In this post, I list articles for Makefile tutorials and tips.
在这篇文章中,我列出了Makefile教程和技巧的文章。
生成文件 (The Makefile)
A very good tutorial on Makefile’s format and how to writing Makefiles
关于Makefile格式以及如何编写Makefile的很好的教程
Link: Suppress echoing of commands in a makefile.
链接: 禁止回显makefile中的命令 。
禁止在makefile中回显命令 (Suppress echoing of commands in a makefile)
We need to print messages when make project to indicate errors/warning/etc. However, the default behaviour of make is to echo each command to stdout before it is executed. Allowing the command to be both echoed and executed causes the message to be printed twice.
在制作项目时,我们需要打印消息以指示错误/警告/等。 但是,make的默认行为是在执行每个命令之前将它们回显到stdout。 允许命令同时回显和执行将导致消息打印两次。
The trick is to prepend an at sign (‘@’) to any command that you do not want to be echoed.
诀窍是在您不希望被回显的任何命令之前加一个at符号('@')。
More reading: The Makefile
更多阅读: Makefile
makefile教程