From patchwork Tue Mar 12 02:57:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 226746 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 320242C02A2 for ; Tue, 12 Mar 2013 13:58:02 +1100 (EST) Received: from localhost ([::1]:39361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFFPc-0001eq-Ef for incoming@patchwork.ozlabs.org; Mon, 11 Mar 2013 22:58:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFFPK-0001dn-KW for qemu-devel@nongnu.org; Mon, 11 Mar 2013 22:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFFPF-0005tX-HM for qemu-devel@nongnu.org; Mon, 11 Mar 2013 22:57:42 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:47725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFFPF-0005sk-4e for qemu-devel@nongnu.org; Mon, 11 Mar 2013 22:57:37 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 1FE882C02A2; Tue, 12 Mar 2013 13:57:32 +1100 (EST) From: David Gibson To: aliguori@us.ibm.com Date: Tue, 12 Mar 2013 13:57:28 +1100 Message-Id: <1363057048-21534-1-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2402:b800:7003:1:1::1 Cc: David Gibson , qemu-devel@nongnu.org, armbru@redhat.com Subject: [Qemu-devel] [PATCH] Fix TAGS creation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Markus Armbruster --- v2: Improved portability based on suggest from Markus Armbruster. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 12c7662..6915178 100644 --- a/Makefile +++ b/Makefile @@ -334,7 +334,8 @@ test speed: all .PHONY: TAGS TAGS: - find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags + rm -f $@ + find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} + cscope: rm -f ./cscope.*