qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/12] Makefile.hw: avoid overly large 'make clean'


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH 10/12] Makefile.hw: avoid overly large 'make clean' rm command
Date: Fri, 22 Jun 2012 10:40:07 +0100

From: Peter Maydell <address@hidden>

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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 Makefile.hw |    4 ++--
 1 file 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.10




reply via email to

[Prev in Thread] Current Thread [Next in Thread]