--- Makefile.org	2005-07-25 23:04:32.000000000 +0900
+++ Makefile	2005-07-26 19:14:58.426212680 +0900
@@ -406,7 +406,7 @@
 # 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%
+			 cscope TAGS tags GTAGS help %docs check%
 
 config-targets := 0
 mixed-targets  := 0
@@ -952,7 +952,7 @@
 MRPROPER_DIRS  += include/config include2
 MRPROPER_FILES += .config .config.old include/asm .version \
                   include/linux/autoconf.h 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
 #
@@ -1034,7 +1034,7 @@
 	@echo  '  dir/            - Build all files in dir and below'
 	@echo  '  dir/file.[ois]  - Build specified target only'
 	@echo  '  rpm		  - Build a kernel as an RPM package'
-	@echo  '  tags/TAGS	  - Generate tags file for editors'
+	@echo  '  tags/TAGS/GTAGS - Generate tags file for editors'
 	@echo  '  cscope	  - Generate cscope index'
 	@echo  ''
 	@echo  'Static analysers'
@@ -1194,12 +1194,17 @@
 	$(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
+quiet_cmd_GTAGS = MAKE   $@
+cmd_GTAGS = $(all-sources) | gtags --file=- -i
+
 TAGS: FORCE
 	$(call cmd,TAGS)
 
 tags: FORCE
 	$(call cmd,tags)
 
+GTAGS: FORCE
+	$(call cmd,GTAGS)
 
 # Scripts to check various things for consistency
 # ---------------------------------------------------------------------------
