Am 31.07.2012 17:51, schrieb Peter Maydell:
On 31 July 2012 16:49, Stefan Weil <s...@weilnetz.de> wrote:
Yes, QEMU creates files in 3 levels. We could use
rm -f *.[od] */*.[od] */*/*.[od]
I suggest using the wrapper $(call quiet-command,...)
to suppress printing of all removed file names.
My worry was not so much what we print as that we
might be exceeding the total command line length
limits on some systems (whether you did it this way
or via "rm -f $(find ...)").
-- PMM
That's quite possible:
$ find -name "*.[od]"|wc
4862 4862 151329
$ ls *.[od] */*.[od] */*/*.[od] */*/*/*.[od] */*/*/*/*.[od]|wc
4862 4862 141605
(I was somewhat surprised to see that we use 5 levels of directories).
The command line would be more than 140000 characters which is indeed
very long.
Separating .o and .d files and the levels reduces that number:
$ ls *.o|wc
80 80 952
$ ls */*.o|wc
819 819 20048
$ ls */*/*.o|wc
1406 1406 45573
$ ls */*/*/*.o|wc
87 87 2579
$ ls */*/*/*/*.o|wc
16 16 796
The 2nd and the 3rd level are potentially critical, but they could be
split up further if needed.
What about removing support for in-tree builds?
For out-of-tree builds 'make distclean' is nearly trivial.
-- Stefan W.