Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-08-01 Thread Stefan Hajnoczi
On Tue, Jul 31, 2012 at 08:24:58AM -0600, Eric Blake wrote: > On 07/31/2012 08:19 AM, Markus Armbruster wrote: > > Peter Maydell writes: > > > >> Avoid having an explicit list of directories in the 'clean' > >> target by using 'find' to remove all .o and .d files instead. > >> > > >>rm -f qe

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Blue Swirl
On Tue, Jul 31, 2012 at 4:20 PM, Stefan Weil wrote: > Am 31.07.2012 17:51, schrieb Peter Maydell: >> >> On 31 July 2012 16:49, Stefan Weil wrote: >>> >>> Yes, QEMU creates files in 3 levels. We could use >>> >>> rm -f *.[od] */*.[od] */*/*.[od] >>> >>> I suggest using the wrapper $(call quie

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Stefan Weil
Am 31.07.2012 17:51, schrieb Peter Maydell: On 31 July 2012 16:49, Stefan Weil wrote: Yes, QEMU creates files in 3 levels. We could use rm -f *.[od] */*.[od] */*/*.[od] I suggest using the wrapper $(call quiet-command,...) to suppress printing of all removed file names. My worry was no

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Peter Maydell
On 31 July 2012 16:49, Stefan Weil wrote: > Yes, QEMU creates files in 3 levels. We could use > > rm -f *.[od] */*.[od] */*/*.[od] > > I suggest using the wrapper $(call quiet-command,...) > to suppress printing of all removed file names. My worry was not so much what we print as that we migh

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Stefan Weil
Am 31.07.2012 17:00, schrieb Peter Maydell: On 31 July 2012 15:38, Daniel P. Berrange wrote: 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] That's exactly the bug t

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Peter Maydell
On 31 July 2012 15:38, Daniel P. Berrange wrote: > 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] That's exactly the bug this change is addressing (in a more gene

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Daniel P. Berrange
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 >

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Markus Armbruster
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

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Eric Blake
On 07/31/2012 08:19 AM, Markus Armbruster wrote: > Peter Maydell writes: > >> Avoid having an explicit list of directories in the 'clean' >> target by using 'find' to remove all .o and .d files instead. >> >> rm -f qemu-options.def >> -rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-g

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Peter Maydell
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

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Markus Armbruster
Peter Maydell writes: > Avoid having an explicit list of directories in the 'clean' > target by using 'find' to remove all .o and .d files instead. > > Signed-off-by: Peter Maydell > --- > I figured that (unlike Makefile.target) we should probably take > the xargs route here since otherwise the

Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Stefan Hajnoczi
On Tue, Jul 31, 2012 at 02:01:35PM +0100, Peter Maydell wrote: > Avoid having an explicit list of directories in the 'clean' > target by using 'find' to remove all .o and .d files instead. > > Signed-off-by: Peter Maydell > --- > I figured that (unlike Makefile.target) we should probably take > t

[Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target

2012-07-31 Thread Peter Maydell
Avoid having an explicit list of directories in the 'clean' target by using 'find' to remove all .o and .d files instead. Signed-off-by: Peter Maydell --- I figured that (unlike Makefile.target) we should probably take the xargs route here since otherwise the rm command line is huge... There's a