mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	kbuild: add GNU GLOBAL tags generation
GNU GLOBAL (http://www.gnu.org/software/global/) is a source code tagging system It is really cheap to support it in kbuild system. Signed-off-by: Jianbin Kang <kjbmail@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
		
							parent
							
								
									38b3439d84
								
							
						
					
					
						commit
						f4ed1009fc
					
				
					 2 changed files with 13 additions and 3 deletions
				
			
		
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							| 
						 | 
					@ -420,7 +420,7 @@ endif
 | 
				
			||||||
# of make so .config is not included in this case either (for *config).
 | 
					# of make so .config is not included in this case either (for *config).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
no-dot-config-targets := clean mrproper distclean \
 | 
					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_% \
 | 
								 include/linux/version.h headers_% \
 | 
				
			||||||
			 kernelversion %src-pkg
 | 
								 kernelversion %src-pkg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1134,7 +1134,7 @@ CLEAN_FILES +=	vmlinux System.map \
 | 
				
			||||||
MRPROPER_DIRS  += include/config usr/include include/generated
 | 
					MRPROPER_DIRS  += include/config usr/include include/generated
 | 
				
			||||||
MRPROPER_FILES += .config .config.old .version .old_version             \
 | 
					MRPROPER_FILES += .config .config.old .version .old_version             \
 | 
				
			||||||
                  include/linux/version.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
 | 
					# 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  '  modules_prepare - Set up for building external modules'
 | 
				
			||||||
	@echo  '  tags/TAGS	  - Generate tags file for editors'
 | 
						@echo  '  tags/TAGS	  - Generate tags file for editors'
 | 
				
			||||||
	@echo  '  cscope	  - Generate cscope index'
 | 
						@echo  '  cscope	  - Generate cscope index'
 | 
				
			||||||
 | 
						@echo  '  gtags           - Generate GNU GLOBAL index'
 | 
				
			||||||
	@echo  '  kernelrelease	  - Output the release version string'
 | 
						@echo  '  kernelrelease	  - Output the release version string'
 | 
				
			||||||
	@echo  '  kernelversion	  - Output the version stored in Makefile'
 | 
						@echo  '  kernelversion	  - Output the version stored in Makefile'
 | 
				
			||||||
	@echo  '  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
 | 
						@echo  '  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
 | 
				
			||||||
| 
						 | 
					@ -1379,7 +1380,7 @@ clean: $(clean-dirs)
 | 
				
			||||||
quiet_cmd_tags = GEN     $@
 | 
					quiet_cmd_tags = GEN     $@
 | 
				
			||||||
      cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
 | 
					      cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tags TAGS cscope: FORCE
 | 
					tags TAGS cscope gtags: FORCE
 | 
				
			||||||
	$(call cmd,tags)
 | 
						$(call cmd,tags)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Scripts to check various things for consistency
 | 
					# Scripts to check various things for consistency
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -114,6 +114,11 @@ docscope()
 | 
				
			||||||
	cscope -b -f cscope.out
 | 
						cscope -b -f cscope.out
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dogtags()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						all_sources | gtags -f -
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exuberant()
 | 
					exuberant()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	all_sources | xargs $1 -a                               \
 | 
						all_sources | xargs $1 -a                               \
 | 
				
			||||||
| 
						 | 
					@ -185,6 +190,10 @@ case "$1" in
 | 
				
			||||||
		docscope
 | 
							docscope
 | 
				
			||||||
		;;
 | 
							;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"gtags")
 | 
				
			||||||
 | 
							dogtags
 | 
				
			||||||
 | 
							;;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"tags")
 | 
						"tags")
 | 
				
			||||||
		rm -f tags
 | 
							rm -f tags
 | 
				
			||||||
		xtags ctags
 | 
							xtags ctags
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue