[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: makefile rules

From: Jim Meyering
Subject: Re: makefile rules
Date: Tue, 21 Dec 2021 11:50:00 -0800

On Tue, Dec 21, 2021 at 11:41 AM Paul Eggert <eggert@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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]