Skip to content
Snippets Groups Projects
Commit 30fd45ad authored by Peter Maydell's avatar Peter Maydell Committed by Stefan Hajnoczi
Browse files

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 '/'.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
parent 4e1797f9
No related branches found
No related tags found
No related merge requests found
......@@ -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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment