* [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target
@ 2012-08-15 11:29 Peter Maydell
2012-08-15 13:25 ` Eric Blake
2012-08-15 13:33 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2012-08-15 11:29 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Stefan Hajnoczi, Stefan Weil, Eric Blake, patches
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 <peter.maydell@linaro.org>
---
Changes v1->v2: use portable 'find -exec' rather than unsafe 'find | xargs'
or unportable 'find -print0 | xargs -0'.
Makefile | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index d736ea5..2964d5c 100644
--- a/Makefile
+++ b/Makefile
@@ -214,13 +214,10 @@ clean:
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
rm -f qemu-options.def
- rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
+ find . -name '*.[od]' -exec rm -f {} +
+ rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
rm -Rf .libs
- rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d
- rm -f qom/*.o qom/*.d libuser/qom/*.o libuser/qom/*.d
- rm -f hw/usb/*.o hw/usb/*.d hw/*.o hw/*.d
rm -f qemu-img-cmds.h
- rm -f trace/*.o trace/*.d
rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp
@# May not be present in GENERATED_HEADERS
rm -f trace-dtrace.h trace-dtrace.h-timestamp
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target
2012-08-15 11:29 [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target Peter Maydell
@ 2012-08-15 13:25 ` Eric Blake
2012-08-15 13:33 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2012-08-15 13:25 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-trivial, Stefan Hajnoczi, Stefan Weil, qemu-devel, patches
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
On 08/15/2012 05:29 AM, 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 <peter.maydell@linaro.org>
> ---
> Changes v1->v2: use portable 'find -exec' rather than unsafe 'find | xargs'
> or unportable 'find -print0 | xargs -0'.
>
> Makefile | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target
2012-08-15 11:29 [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target Peter Maydell
2012-08-15 13:25 ` Eric Blake
@ 2012-08-15 13:33 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-08-15 13:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-trivial, Stefan Weil, Eric Blake, qemu-devel, patches
On Wed, Aug 15, 2012 at 12:29:24PM +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 <peter.maydell@linaro.org>
> ---
> Changes v1->v2: use portable 'find -exec' rather than unsafe 'find | xargs'
> or unportable 'find -print0 | xargs -0'.
>
> Makefile | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-15 13:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 11:29 [Qemu-devel] [PATCH v2] Makefile: Avoid explicit list of directories in clean target Peter Maydell
2012-08-15 13:25 ` Eric Blake
2012-08-15 13:33 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).