GNU Make silent by default

If you define the target .SILENT:, then make will not echo anything. It’s usually best to guard the definition, so you can easily turn it off: ifndef VERBOSE .SILENT: endif Now by default, make will print nothing, but if you run make VERBOSE=1, it will print. Note that despite the statement in the manual claiming … Read more

How to ignore mv error?

Errors in Recipes (from TFM) To ignore errors in a recipe line, write a – at the beginning of the line’s text (after the initial tab). So the target would be something like: moveit: -mv foo.o ../baz

Declare all targets PHONY

If really all targets are PHONY, this is a bit pointless. make is meant for “do what is necessary to update my output“, and if the answer to what is necessary? is always the same, simple scripts would do the same job with less overhead. That being said, I could imagine a situation where all … Read more