qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target
@ 2012-07-31 13:01 Peter Maydell
  2012-07-31 13:25 ` Stefan Hajnoczi
  2012-07-31 14:19 ` Markus Armbruster
  0 siblings, 2 replies; 13+ messages in thread
From: Peter Maydell @ 2012-07-31 13:01 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Stefan Hajnoczi, Jan Kiszka, 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>
---
I figured that (unlike Makefile.target) we should probably take
the xargs route here since otherwise the rm command line is huge...

There's also an argument that there's not much point having a clean
target in Makefile.target when this one blows away most of it anyway.

 Makefile |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 621cb86..9f7eaa8 100644
--- a/Makefile
+++ b/Makefile
@@ -212,13 +212,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]' | xargs 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
-	rm -f usb/*.o 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] 13+ messages in thread

end of thread, other threads:[~2012-08-01 10:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 13:01 [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target Peter Maydell
2012-07-31 13:25 ` Stefan Hajnoczi
2012-07-31 14:19 ` Markus Armbruster
2012-07-31 14:21   ` Peter Maydell
2012-07-31 14:35     ` Markus Armbruster
2012-07-31 14:38       ` Daniel P. Berrange
2012-07-31 15:00         ` Peter Maydell
2012-07-31 15:49           ` Stefan Weil
2012-07-31 15:51             ` Peter Maydell
2012-07-31 16:20               ` Stefan Weil
2012-07-31 17:02                 ` Blue Swirl
2012-07-31 14:24   ` Eric Blake
2012-08-01 10:28     ` 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).