From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F65C433E0 for ; Thu, 14 Jan 2021 17:17:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C930C23B1A for ; Thu, 14 Jan 2021 17:17:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C930C23B1A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l06Fa-0003qd-Rd for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 12:17:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l05wR-0003fh-44 for qemu-devel@nongnu.org; Thu, 14 Jan 2021 11:57:47 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:33390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l05wG-0004vv-Uo for qemu-devel@nongnu.org; Thu, 14 Jan 2021 11:57:46 -0500 Received: by mail-wr1-x436.google.com with SMTP id t30so6544835wrb.0 for ; Thu, 14 Jan 2021 08:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EvR0AZKqAEJE1jZSnKHKNZ6eUSpG9JBFccb7SlwK3GI=; b=qANiLp6ZCcSgr2MdBgJCAitpdEJTgM6p75TeCnCGI+44OQnf1vJ8QVTFtLHnctjeUK GckdnIz8i6KtC3EvFNl4KTtr6+EFVlpAwdFNxg4dDZOVG3C6EQksXk2I3yePCxFQXESX CWsKAQbc32efRHu4Bmfj+j36k18Gk+Z0QZ0PDQUjzk5sqsYRMnxqAIUcyk4vM/qODNhO QzeW3QxOs6G2knivtyW+8Weql03BZEnnz1IhDygt8gijA7NPw6yQULVSSbQwsfOSFGbD SfAMFSdUYsW1uVPX+k/ohvDz/Re+W6gWUb+Nfkevr5phVIReKOLicz28b5tjhtwrvf9W uOPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EvR0AZKqAEJE1jZSnKHKNZ6eUSpG9JBFccb7SlwK3GI=; b=UylJz38rSVoszyyEmapq4AfNxuLjxTXGyi+bboWZw52t/nu/2LcjwUEEVO4x/IZtBH XeaNHGjoFj5i0O7N3W7VdP3jNJi1+rFEdYUjHiJ3xCpHjOPnUNmWjbj/WdRACgxuqF3p sCoaTQq8y4t8qYhxrW3p4V5D1EtlQuuQunxvfD1HZWYY5rt/dAYvHKGm9/ZTM4XLET6I DfUswilVvvlK/2yz6kvrmIxomvgPYSGCUS3KDtg/wV87nuTPCSdDJWdjlpp/mlr9DthG g9Gs2zBCiyE4OnXC+ajRAjMTy5bkwKrZQp7cRN8NpKWvkeRqkovgqYWP5/wLEOw5ajHk tW3w== X-Gm-Message-State: AOAM5317sq6SVmhxxHm3lbVt4W0fvKtap/wwBWYRlRCATqY9udkGlM0h qABfP94Kr4ZI/4VWPTp3GcxBtw== X-Google-Smtp-Source: ABdhPJwPxxSAoGRqlHtrUaq+mz5k2Nf7/Dw0mYFOhDD8upiMgSb4+4opQbgZHkbreFKAcbE53YTdDg== X-Received: by 2002:adf:d843:: with SMTP id k3mr8945412wrl.346.1610643455473; Thu, 14 Jan 2021 08:57:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k1sm10590808wrn.46.2021.01.14.08.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 08:57:30 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4978F1FF8C; Thu, 14 Jan 2021 16:57:30 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 02/12] Makefile: add GNU global tags support Date: Thu, 14 Jan 2021 16:57:20 +0000 Message-Id: <20210114165730.31607-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210114165730.31607-1-alex.bennee@linaro.org> References: <20210114165730.31607-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" GNU Global is another tags engine which is more like cscope in being able to support finding both references and definitions. You will be un-surprised to know it also integrates well with Emacs. The main benefit of integrating it into find-src-path is it takes less time to rebuild the database from scratch when you have a lot of build directories under your source tree. Signed-off-by: Alex Bennée --- v2 - run in SRC_PATH - wrap in quiet-command --- Makefile | 14 +++++++++++++- .gitignore | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fb9923ff22..0c509a7704 100644 --- a/Makefile +++ b/Makefile @@ -253,6 +253,18 @@ ctags: rm -f "$(SRC_PATH)/"tags $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} + +.PHONY: gtags +gtags: + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"GTAGS; \ + rm -f "$(SRC_PATH)/"GRTAGS; \ + rm -f "$(SRC_PATH)/"GPATH, \ + "GTAGS", "Remove old $@ files") + $(call quiet-command, \ + (cd $(SRC_PATH) && \ + $(find-src-path) | gtags -f -), \ + "GTAGS", "Re-index $(SRC_PATH)") + .PHONY: TAGS TAGS: rm -f "$(SRC_PATH)/"TAGS @@ -279,7 +291,7 @@ help: $(call print-help,all,Build all) $(call print-help,dir/file.o,Build specified target only) $(call print-help,install,Install QEMU, documentation and tools) - $(call print-help,ctags/TAGS,Generate tags file for editors) + $(call print-help,ctags/gtags/TAGS,Generate tags file for editors) $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' diff --git a/.gitignore b/.gitignore index b32bca1315..75a4be0724 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ cscope.* tags TAGS +GPATH +GRTAGS +GTAGS *~ *.ast_raw *.depend_raw -- 2.20.1