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.

Leave a Comment