From patchwork Fri Jan 14 09:56:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianbin Kang X-Patchwork-Id: 477931 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 p0E9uS8D019019 for ; Fri, 14 Jan 2011 09:56:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754022Ab1ANJ40 (ORCPT ); Fri, 14 Jan 2011 04:56:26 -0500 Received: from mail-qy0-f174.google.com ([209.85.216.174]:33431 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005Ab1ANJ4Z (ORCPT ); Fri, 14 Jan 2011 04:56:25 -0500 Received: by qyj19 with SMTP id 19so6621988qyj.19 for ; Fri, 14 Jan 2011 01:56:24 -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=Vxdknfl40wey7zxtX16atOdCRx6f5y7LUwwdv+UiIqs=; b=C8fZl5JuQncYSoihtealtoPeZkwIu7XcblsoKMO2MsvkWpdAjZqrguL0sfhe2kZ+Nh qtnr7Nj3lOLmXa7gcqZ5xj3KFUMRcNxF3NIXAq5jxi50EoYW6DxsCVq9iORs38DryZPA 4/3Pvz7KC7/20DeRYSOiLAZy9EN1AhrpYvxak= 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=I5qUEHYzGvtty3gRJ4QcYmjxxE94YAAoeX3y8MpfEPJPSt9vyYluyB5TmM+ua+SnNu bnJpE1mfcOLBTjdNy0XjcVtqh81f+af7wW9VUjuKRMABrf88GMV2p9/NUyIWOnUOF3wL NIaf1m4DSsZZb3JKqOLMRhxxybNVvp2E2poPk= MIME-Version: 1.0 Received: by 10.229.218.210 with SMTP id hr18mr496095qcb.220.1294998983565; Fri, 14 Jan 2011 01:56:23 -0800 (PST) Received: by 10.220.201.11 with HTTP; Fri, 14 Jan 2011 01:56:23 -0800 (PST) Date: Fri, 14 Jan 2011 17:56:23 +0800 Message-ID: Subject: [PATCH] kbuild: add global tags generation (fixed signed-off-by) 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 09:58:40 +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 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