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

How to undo intermediate file deletion

If you’re using GNUMake, you can use the special target .PRECIOUS: .PRECIOUS: fact_test_without_proxies.c fact_test_main.c fact_test_without_proxies.o or just .PRECIOUS: %.c %.o Its only effect is that these files will not be deleted if Make is killed or interrupted.