libtool
[Top][All Lists]
Advanced

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

Re: libtool cvs rm -f ""


From: Olly Betts
Subject: Re: libtool cvs rm -f ""
Date: Thu, 11 Oct 2001 00:45:11 +0100
User-agent: Mutt/1.2.5i

On Thu, Oct 11, 2001 at 09:24:15AM +1000, Kevin Ryde wrote:
> Solaris 2.7 and HP-UX 10 don't think much of
> 
>         rm -f ""
> 
> it provokes a bit of an error
> 
>         rm: cannot remove `.' or `..'
> 
> This arises from libtool when compiling, I think due to $output_obj
> being empty when -c -o works.
> 
> This is no more than cosmetic, but perhaps cases where that might
> happen should have a 2>/dev/null or similar.
> 
> Bit silly really, the whole point of -f is to make rm shut up in the
> first place.

automake uses this construction in clean rules:

-test -z "$(FOO)" || rm -f $(FOO)

The comment in clean.am says:

## We must test each macro because it might be empty, and an empty "rm
## -rf" command looks disturbing.  Also, the Solaris 2.4 "rm" will
## return an error if there are no arguments other than "-f".

Cheers,
Olly



reply via email to

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