bug-automake
[Top][All Lists]
Advanced

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

Re: some clean rules don't work when some file starts with '-'


From: Vincent Lefevre
Subject: Re: some clean rules don't work when some file starts with '-'
Date: Fri, 21 Mar 2008 03:01:30 +0100
User-agent: Mutt/1.5.17-vl-r21552 (2008-03-11)

On 2008-03-21 00:24:20 +0100, Ralf Wildenhues wrote:
> Hello Vincent,
> 
> * Vincent Lefevre wrote on Thu, Mar 20, 2008 at 01:26:21PM CET:
> > mostlyclean-compile:
> >         -rm -f *.$(OBJEXT)
> > 
> > This results in:
> 
> > rm -f *.o
> > rm: invalid option -- .
> > Try `rm ./-.o' to remove the file `-.o'.
> 
> Why would you do that, using non-portable file names?

Such filenames can appear, even though they are not part of the source.
In particular, -.o can be generated by gcc. For instance:

  echo 'void tst(void) { }' | gcc -xc -c -

In any case, "make clean" should not be confused by such filenames.

> > mostlyclean-compile:
> >         -rm -f ./*.$(OBJEXT)
> 
> FWIW, this wouldn't work (touch ./-a.o ./-b.o).

No problem here. I don't see why this wouldn't work.

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)




reply via email to

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