* [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command
@ 2012-06-19 14:55 Peter Maydell
2012-06-22 9:04 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2012-06-19 14:55 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, patches
Avoid 'make clean' producing an 'rm' command which has a lot
of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..))
rather than $(dir $(sort ..)) so Make's sort function will
remove the duplicates for us. We can also remove the double
'//' safely because $(dir ..) is guaranteed to return a string
ending in '/'.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Mostly cosmetic, although I guess there's a faint chance that expanding
all those hw/*.o would hit the command line argument buffer limit...
Makefile.hw | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.hw b/Makefile.hw
index 2bcbaff..28fe100 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -19,8 +19,8 @@ all: $(hw-obj-y)
@true
clean:
- rm -f $(addsuffix /*.o, $(dir $(sort $(hw-obj-y))))
- rm -f $(addsuffix /*.d, $(dir $(sort $(hw-obj-y))))
+ rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
+ rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
# Include automatically generated dependency files
-include $(patsubst %.o, %.d, $(hw-obj-y))
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command
2012-06-19 14:55 [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command Peter Maydell
@ 2012-06-22 9:04 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2012-06-22 9:04 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-trivial, Paolo Bonzini, qemu-devel, patches
On Tue, Jun 19, 2012 at 03:55:38PM +0100, Peter Maydell wrote:
> Avoid 'make clean' producing an 'rm' command which has a lot
> of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..))
> rather than $(dir $(sort ..)) so Make's sort function will
> remove the duplicates for us. We can also remove the double
> '//' safely because $(dir ..) is guaranteed to return a string
> ending in '/'.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Mostly cosmetic, although I guess there's a faint chance that expanding
> all those hw/*.o would hit the command line argument buffer limit...
>
> Makefile.hw | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-22 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 14:55 [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command Peter Maydell
2012-06-22 9:04 ` 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).