bug-automake
[Top][All Lists]
Advanced

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

bug#10828: [RFC] POSIX will say running "rm -f" with no argument is OK


From: Mike Frysinger
Subject: bug#10828: [RFC] POSIX will say running "rm -f" with no argument is OK
Date: Wed, 15 Dec 2021 23:03:06 -0500

On 15 Dec 2021 14:48, Karl Berry wrote:
>     > rm -f NOTFOUND $(VAR)
>     i think this is an interesting route.  
> 
> I agree.
> 
>     we could do:
>             rm -f $(am__rm_f_notfound) ...
>     and am__rm_f_notfound could be set based on the configure test.
> 
> Sounds plausible to me. The "only" problem is that there are dozens or
> hundreds of places in the code that do rm -f. They would all have to be
> inspected and changed (or not) ... -k

the issue isn't `rm -f` exactly, it's `rm -f` with a variable that could be
empty.  so that narrows it down at least by half.

if we focus on ones using the pattern `test -z ... || rm -f ...`, there's
barely a dozen of those.  i'm not sure we need to fully audit the tree and
review every `rm`, just do a best effort and wait for feedback (i.e. bugs).

we could add a helper var to further collapse the boiler plate.
        am__rm_f = rm -f $(am__rm_f_notfound)
then the rule is a bit more palatable:
        $(am__rm_f) ...

or if we want to claim namespace and make it something we want to export
for users of automake akin to AC_PROG_LN_S, we could use RM_F.
-mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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