On Tue, Dec 21, 2021 at 11:41 AM Paul Eggert <egg...@cs.ucla.edu> wrote: ... > If you run 'make' sometimes as one user and sometimes as another, you > can have problems like that no matter what. We don't put 'rm -f $@' at > the start of every other makefile recipe to work around those problems; > why are these recipes special?
[I didn't look at any precise rule, but...] One must delete $@ and the potential $@-t temporary file in any rule that creates a generated file and marks it (as I prefer always to do) as read-only by using chmod to subtract write permissions. Otherwise, the attempt to redirect to $@-t (when it is read-only) will fail.