Received: from eggs.gnu.org ([208.118.235.92]:59532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwFBu-00062z-Md for qemu-devel@nongnu.org; Tue, 31 Jul 2012 12:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwFBt-0001QW-HT for qemu-devel@nongnu.org; Tue, 31 Jul 2012 12:21:02 -0400 Message-ID: <501805EB.9070606@weilnetz.de> Date: Tue, 31 Jul 2012 18:20:59 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1343739695-7757-1-git-send-email-peter.maydell@linaro.org> <87pq7c9fng.fsf@blackfin.pond.sub.org> <87k3xk577l.fsf@blackfin.pond.sub.org> <20120731143834.GJ2475@redhat.com> <5017FE6F.7090107@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Makefile: Avoid explicit list of directories in clean target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: patches@linaro.org, qemu-trivial@nongnu.org, Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , Jan Kiszka Am 31.07.2012 17:51, schrieb Peter Maydell: > On 31 July 2012 16:49, Stefan Weil 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.