From patchwork Fri Jan 14 12:07:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianbin Kang X-Patchwork-Id: 478171 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0EC79vY027507 for ; Fri, 14 Jan 2011 12:07:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621Ab1ANMHI (ORCPT ); Fri, 14 Jan 2011 07:07:08 -0500 Received: from mail-qy0-f174.google.com ([209.85.216.174]:58173 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447Ab1ANMHG (ORCPT ); Fri, 14 Jan 2011 07:07:06 -0500 Received: by qyj19 with SMTP id 19so6732593qyj.19 for ; Fri, 14 Jan 2011 04:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=h0g69/+D2NlCAdASwaG2UGulbfEJB88pvaMiYa9QYAY=; b=Qrje2EOfRX7SZvgarVettHMpzE8SVW/HnAil8zIw8vEa+uXVJtV1Ld5gnfnsfGd0ek 1vVqedZwaHQiMfZ2fylaZvtgGzJy4ms8n4m7EKzKyEAeb+58fy/FFauwTt0xWtfQykj0 oIiF/mnlTl85rhSUOKPRIHEcE1b7xV7sNp7T4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=cvplL6vUiZ5EbZ/ApoqnCChtwaGEMjnniXtMewbOTlZMNLNJpcn5xg046NSHAgN8aj PBHsNhtJSseiYsJiRNy3EZyU2APW9uJJdPpWaAPR4MU63NJb6Nq9NNdfE/Bw6Z+8UmOw HZ9BwmfqIMn+B/mTfOKG4oQqRjp3nnEBefH4U= MIME-Version: 1.0 Received: by 10.229.227.8 with SMTP id iy8mr614601qcb.182.1295006825915; Fri, 14 Jan 2011 04:07:05 -0800 (PST) Received: by 10.220.201.11 with HTTP; Fri, 14 Jan 2011 04:07:05 -0800 (PST) Date: Fri, 14 Jan 2011 20:07:05 +0800 Message-ID: Subject: [PATCH] kbuild: add GNU GLOBAL tags generation From: Jianbin Kang To: Michal Marek Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 14 Jan 2011 12:07:09 +0000 (UTC) diff --git a/Makefile b/Makefile index 74b2555..127a371 100644 --- a/Makefile +++ b/Makefile @@ -420,7 +420,7 @@ endif # of make so .config is not included in this case either (for *config). no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% coccicheck \ + cscope gtags TAGS tags help %docs check% coccicheck \ include/linux/version.h headers_% \ kernelversion %src-pkg @@ -1134,7 +1134,7 @@ CLEAN_FILES += vmlinux System.map \ MRPROPER_DIRS += include/config usr/include include/generated MRPROPER_FILES += .config .config.old .version .old_version \ include/linux/version.h \ - Module.symvers tags TAGS cscope* + Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS # clean - Delete most, but leave enough to build external modules # @@ -1221,6 +1221,7 @@ help: @echo ' modules_prepare - Set up for building external modules' @echo ' tags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' + @echo ' gtags - Generate GNU GLOBAL index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ @@ -1379,7 +1380,7 @@ clean: $(clean-dirs) quiet_cmd_tags = GEN $@ cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@ -tags TAGS cscope: FORCE +tags TAGS cscope gtags: FORCE $(call cmd,tags) # Scripts to check various things for consistency diff --git a/scripts/tags.sh b/scripts/tags.sh index bbbe584..0a64ea4 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -114,6 +114,11 @@ docscope() cscope -b -f cscope.out } +dogtags() +{ + all_sources | gtags -f - +} + exuberant() { all_sources | xargs $1 -a \ @@ -187,6 +192,10 @@ case "$1" in docscope ;; + "gtags") + dogtags + ;; + "tags") rm -f tags xtags ctags