Received: from eggs.gnu.org ([208.118.235.92]:36399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDVGa-00041Q-4N for qemu-devel@nongnu.org; Thu, 07 Mar 2013 02:29:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDVGY-0003Be-Iz for qemu-devel@nongnu.org; Thu, 07 Mar 2013 02:29:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDVGY-0003BT-C2 for qemu-devel@nongnu.org; Thu, 07 Mar 2013 02:29:26 -0500 From: Markus Armbruster References: <1362624481-31087-1-git-send-email-david@gibson.dropbear.id.au> Date: Thu, 07 Mar 2013 08:29:20 +0100 In-Reply-To: <1362624481-31087-1-git-send-email-david@gibson.dropbear.id.au> (David Gibson's message of "Thu, 7 Mar 2013 13:48:01 +1100") Message-ID: <87d2vbu0q7.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] Fix TAGS creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org David Gibson writes: > Currently the Makefile creates TAGS for emacs with the command: > find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags > That works only if xargs ends up invoking etags just once. If xargs runs > etags several times, as it will if there are enough files, then the later > invocations will overwrite the output from the earlier invocations. This > patch uses the etags --append option to fix the bug. > > Signed-off-by: David Gibson > --- > Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 2262410..bb576da 100644 > --- a/Makefile > +++ b/Makefile > @@ -331,7 +331,8 @@ test speed: all > > .PHONY: TAGS > TAGS: > - find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags > + rm -f $@ > + find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags --append > > cscope: > rm -f ./cscope.* Slightly more portable: find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +