From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horst Kronstorfer Date: Sun, 19 Feb 2006 16:06:41 +0100 Subject: [U-Boot-Users] [PATCH] Add target 'cscope' to Makefile Message-ID: <20060219150640.GA3310@aquarius> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de hi! the following patch adds target 'cscope' to the main makefile. it also puts the list of directories with source files and the arguments to `find' into make variables. Signed-off-by: Horst Kronstorfer diff --git a/Makefile b/Makefile index 9305cab..80e3677 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,14 @@ SUBDIRS = tools \ post/cpu .PHONY : $(SUBDIRS) +# Directories with files for tag generation +TAGDIRS := $(SUBDIRS) include lib_generic board/$(BOARDDIR) cpu/$(CPU)\ + lib_$(ARCH) fs/cramfs fs/fat fs/fdos fs/jffs2 net disk rtc dtt drivers\ + drivers/sk98lin common + +# Arguments to `find' when generating a list of files for tag generation +TAGFINDARGS := \( -name CVS -prune \) -o \( -name '*.[ch]' -print \) + ######################################################################### ######################################################################### @@ -179,19 +187,14 @@ gdbtools: depend dep: @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done +cscope: + find $(TAGDIRS) $(TAGFINDARGS) >cscope.files; cscope -b -q -k + tags: - ctags -w `find $(SUBDIRS) include \ - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \ - fs/cramfs fs/fat fs/fdos fs/jffs2 \ - net disk rtc dtt drivers drivers/sk98lin common \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` + ctags -w `find $(TAGDIRS) $(TAGFINDARGS)` etags: - etags -a `find $(SUBDIRS) include \ - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \ - fs/cramfs fs/fat fs/fdos fs/jffs2 \ - net disk rtc dtt drivers drivers/sk98lin common \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` + etags -a `find $(TAGDIRS) $(TAGFINDARGS)` System.map: u-boot @$(NM) $< | \ @@ -1838,7 +1841,7 @@ clobber: clean -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \ -print0 \ | xargs -0 rm -f - rm -f $(OBJS) *.bak tags TAGS + rm -f $(OBJS) *.bak tags TAGS cscope.* rm -fr *.*~ rm -f u-boot u-boot.map u-boot.hex $(ALL) rm -f tools/crc32.c tools/environment.c tools/env/crc32.c -h