Skip to content
  • Brad King's avatar
    Makefile: Tell GNU make to delete rule outputs on error (#15474) · 4adf1dad
    Brad King authored
    
    
    Add .DELETE_ON_ERROR to the "build.make" files that contain the actual
    build rules that generate files.  This tells GNU make to delete the
    output of a rule if the recipe modifies the output but returns failure.
    This is particularly useful for custom commands that use shell
    redirection to produce a file.
    
    Do not add .DELETE_ON_ERROR for Borland or Watcom make tools because
    they may not tolerate it and would not honor it anyway.  Other make
    tools that do not understand .DELETE_ON_ERROR will not be hurt.
    
    Suggested-by: default avatarAndrey Vihrov <andrey.vihrov@gmail.com>
    4adf1dad