diff options
-rw-r--r-- | template/Makefile.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/template/Makefile.in b/template/Makefile.in index 94f41181d5..71b68edbeb 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -294,6 +294,10 @@ all: # Prevent GNU make v3 from overflowing arg limit on SysV. .NOEXPORT: +# On GNU make and BSD make, clean up the target when the recipe +# fails. Prevents half-built targets corrupting future runs. +.DELETE_ON_ERROR: + miniruby$(EXEEXT): @-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi $(ECHO) linking $@ |