[PATCH] Making make clean really work
Peter Firefly Lund
firefly@one2one-networks.com
Tue, 31 Jul 2001 08:35:55 +0200
Harald Welte wrote:
> On Wed, Jul 25, 2001 at 12:13:55AM +0200, Peter Firefly Lund wrote:
> > I discovered that make clean didn't /really/ work due to someone having
> > a mental picture of find's operation that differed slightly from the one
> > find itself had ;)
>
> hm.
>
> a) the PHONY patches are ok.
>
> b) the find syntax is correct, AFAICT. I think it should either be like
> it currently is, or " -name '*.[ao]' -o '*.so' (which has the same
> meaning as what we currently have
No. As it stands now the -name operations ("filters") are connected by an
implicit and. That needs to be an or instead. Take a look at the Linux
makefiles, they use -o, too.
From the man page:
OPERATORS
Listed in order of decreasing precedence:
( expr )
Force precedence.
! expr True if expr is false.
-not expr
Same as ! expr.
expr1 expr2
And (implied); expr2 is not evaluated if expr1 is
false.
expr1 -a expr2
Same as expr1 expr2.
expr1 -and expr2
Same as expr1 expr2.
expr1 -o expr2
Or; expr2 is not evaluated if expr1 is true.
expr1 -or expr2
Same as expr1 -o expr2.
Besides, like I sincerely hope I've written a couple of places, it didn't clean
up properly before and it does now. (I was trying to add some fprintf(stderr,
....) to libiptc.c and accidentally left a libiptc4.o file lying around which
make clean /didn't/ clean up).
That misunderstand wasted almost all of one of my Fridays. Or was it Mondays?
So place accept the patch... ;)
-Peter