Makefile.inc: Rework automatic backup (bug 2527)