[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: find usage of gcov-clean target in Makefile.in

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Thu, 28 Nov 2019 20:41:46 -0500

On Thu, Nov 28, 2019 at 4:18 PM Daniel Shahaf <d.s_at_daniel.shahaf.name>
wrote:

> Yasuhito FUTATSUKI wrote on Fri, Nov 29, 2019 at 00:15:48 +0900:
> > Hi, while I do 'make distclean', I find odd `find' usage.
> >
> > In Makefile.in:
> > > gcov-clean:
> > > rm -f gcov-lcov.dat gcov-lcov.log gcov-genhtml.log
> > > rm -rf gcov-report
> > > find . -name "*.gcda" -o -name "*.gcno" -exec rm -f -- {} \;
> >
> > Is it intended below ?
> > find . \( -name "*.gcda" -o -name "*.gcno" \) -exec rm -f -- {}\;
>
> I believe so, yes. Good catch.
>
> > I also want to insert `-name ".svn" -prune -or ' to avoid searching
> > files into metadata directory in working copy, for I can find it
> > because it takes long time to execute gov-clean target on my jalopy
> > computer :)
>
> Is -prune portable? I don't see it in the POSIX spec of find(1).

Where did you look? This page mentions -prune and even provides an example:
https://pubs.opengroup.org/onlinepubs/009695399/utilities/find.html

If you don't trust -prune then there's the following rather lengthy debate
(rather than a clear cut answer) on stack exchange:

https://stackoverflow.com/questions/4210042/how-to-exclude-a-directory-in-find-command

Nathan
Received on 2019-11-29 02:42:08 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.