From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwDbh-0003oD-Kp for qemu-devel@nongnu.org; Tue, 31 Jul 2012 10:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwDbf-0004ox-Pk for qemu-devel@nongnu.org; Tue, 31 Jul 2012 10:39:33 -0400 Date: Tue, 31 Jul 2012 15:38:34 +0100 From: "Daniel P. Berrange" Message-ID: <20120731143834.GJ2475@redhat.com> References: <1343739695-7757-1-git-send-email-peter.maydell@linaro.org> <87pq7c9fng.fsf@blackfin.pond.sub.org> <87k3xk577l.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87k3xk577l.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , patches@linaro.org, qemu-trivial@nongnu.org, Stefan Weil , qemu-devel@nongnu.org, Jan Kiszka , Stefan Hajnoczi On Tue, Jul 31, 2012 at 04:35:42PM +0200, Markus Armbruster wrote: > Peter Maydell writes: > > > On 31 July 2012 15:19, Markus Armbruster wrote: > >> Peter Maydell writes: > >>> + find . -name '*.[od]' | xargs rm -f > >>> + rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod > >>> *~ */*~ > >> > >> Shit happens if you somehow manage to create a "mean" file name in the > >> build tree. Sure you don't want to -print0 | xargs -0? > > > > -print0 isn't POSIX, so I wasn't sure it would be present on all > > our platforms. (It's probably fairly safe, though...) > > Another option is "-exec rm {} +". Isn't using 'find' somewhat overkill here really. QEMU only creates .o and .d files in 2 levels of directory, so sure we can just avoid find entirely rm -f *.[od] */*.[od] Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|