ia64/xen-unstable

changeset 11600:f983ed5e9098

Clean up and enhance "make tags"

- delete correct file in _tags rule
- don't prune nonexistent files/dirs
- call exuberant-ctags with additional flags from Linux:
-I to ignore some misleading hits
--extra=+f to include an entry for the basename of every file
--c-kinds=+px to add prototypes and external variable declarations

Signed-off-by: Aron Griffis <aron@hp.com>
author kfraser@localhost.localdomain
date Sat Sep 23 14:07:30 2006 +0100 (2006-09-23)
parents decde35c6abf
children 828c0c89d830
files xen/Makefile
line diff
     1.1 --- a/xen/Makefile	Sat Sep 23 14:04:22 2006 +0100
     1.2 +++ b/xen/Makefile	Sat Sep 23 14:07:30 2006 +0100
     1.3 @@ -123,19 +123,29 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h
     1.4  
     1.5  SUBDIRS = acm arch/$(TARGET_ARCH) common drivers 
     1.6  define all_sources
     1.7 -    ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
     1.8 -      find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
     1.9 -            -name config \) -prune -o -name '*.h' -print; \
    1.10 -      find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
    1.11 +    ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \
    1.12 +      find include -name 'asm-*' -prune -o -name '*.h' -print; \
    1.13 +      find $(SUBDIRS) -name '*.[chS]' -print )
    1.14 +endef
    1.15 +
    1.16 +define set_exuberant_flags
    1.17 +    exuberant_flags=`$1 --version 2>/dev/null | grep -iq exuberant && \
    1.18 +	echo "-I __initdata,__exitdata,__acquires,__releases \
    1.19 +	    -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
    1.20 +	    --extra=+f --c-kinds=+px"`
    1.21  endef
    1.22  
    1.23  .PHONY: _TAGS
    1.24  _TAGS: 
    1.25 -	rm -f TAGS && $(all_sources) | xargs etags -a
    1.26 +	rm -f TAGS; \
    1.27 +	$(call set_exuberant_flags,etags); \
    1.28 +	$(all_sources) | xargs etags $$exuberant_flags -a
    1.29  
    1.30  .PHONY: _tags
    1.31  _tags: 
    1.32 -	rm -f TAGS && $(all_sources) | xargs ctags -a
    1.33 +	rm -f tags; \
    1.34 +	$(call set_exuberant_flags,ctags); \
    1.35 +	$(all_sources) | xargs ctags $$exuberant_flags -a
    1.36  
    1.37  .PHONY: _cscope
    1.38  _cscope: