This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFC/PATCH] make "make install" play nicely in CVS trees


> -----Original Message-----
> From: Ian Lance Taylor [mailto:ian@wasabisystems.com] 
> Sent: 25 March 2004 17:44

> "Dave Korn" <dk@artimi.com> writes:
> 
> >   So, do you think it would be suitable to replace the for 
> loop with a 
> > couple of lines like:
> > 
> > 	find $(libsubdir)/include/ -name '\*.h' -xargs rm
> > 	-rm $(libsubdir)/include/README
> > 
> > because if that's acceptable (in terms of gnu portable shell coding 
> > standards), I'll send a take 2 tomorrow.
> 
> I don't know you if you mean to say -xargs, but that is not portable.
> The xargs program is reasonably portable, but will break if 
> any of the file names include spaces.  xargs -0 is not portable.

  Not only that, but rm complains if it's passed an empty list, so it would
need "-find" at the very least.  However.

> This is portable:
>     find $(libsubdir)/include -name '*.h' -exec rm -f '{}'
> 
> Ian

  Cheers.  I'm not going to be at work for much longer this afternoon, so
I'll send a take 2 tomorrow.  BTW, is there a written set of guidelines
about what shell constructs are portable enough to use in gnu software?



    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]