Makefile.hw: avoid overly large 'make clean' rm command
PATCH 1/1 Makefile.hw: avoid overly large 'make clean' rm command
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 '/'.
---
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(-)
Makefile.hw +2 -2
@@ -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))
Signature · 1 line
1.7.1
Stefan Hajnoczi
AppliedQuoted 7 lines · Peter Maydell
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 '/'.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>---
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