Makefile Tutorials

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.

In this post, I list articles for Makefile tutorials and tips.

The Makefile

A very good tutorial on Makefile’s format and how to writing Makefiles

Link: Suppress echoing of commands in a 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.

The trick is to prepend an at sign (‘@’) to any command that you do not want to be echoed.

More reading: The Makefile

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *