[PATCH (mtd-utils)] Makefile: fix "make clean" for old GNU find

Brian Norris computersforpeace at gmail.com
Thu Mar 8 12:52:56 EST 2012


On Thu, Mar 8, 2012 at 8:54 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> On Fri, Mar 2, 2012 at 17:17, Brian Norris <computersforpeace at gmail.com> wrote:
>> However, it will launch a lot more `rm' processes...
>
> indeed, that does suck.  you could do this, but it kind of sucks too ...
> CLEAN_FIND = find "$(BUILDDIR)/" -xdev '(' -name '*.[ao]' -o -name
> '.*.c.dep' ')'
> ...
>    @if test -d "$(BUILDDIR)/"; then
>        $(CLEAN_FIND) -exec rm -f {} + 2>/dev/null || \
>        $(CLEAN_FIND) -exec rm -f {} \; ; \
>    fi

I'm fine with that too. It's a little uglier, but it's not quite as
bad for systems that have a modern `find', I think. I'll resend with
your suggestion if there are no better suggestions.

Brian



More information about the linux-mtd mailing list