Skip to contentSkip to conversation

add cscope build target

PATCH New Li Yang 3 participants 4 messages Feb 27, 2008 – Feb 28, 2008 Kbuild

lore
Share & tools
lore

Li Yang

author
#0 lore raw

PATCH 1/1 add cscope build target

Add cscope build target to generate cscope database for code browsing.

---
 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Makefile +4 -0
index d6a0299..1efd33e 100644
@@ -400,6 +400,10 @@ tags ctags:
 etags:
 		etags -a -o $(obj)etags `find $(SUBDIRS) $(TAG_SUBDIRS) \
 						-name '*.[ch]' -print`
+cscope:
+		find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \
+						> cscope.files
+		cscope -b -q -k
 
 $(obj)System.map:	$(obj)u-boot
 		@$(NM) $< | \
Signature · 1 line
1.5.4.rc4
#1 lore raw

PATCH 1/1 add cscope build target

Makefile tags ctags: · line 406

Quoted 4 lines · Li Yang
Makefile +4 -0
+cscope:
+		find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \
+						> cscope.files
+		cscope -b -q -k

isnt the default cscope behavior to scan the working directory for source files ? in other words, why do you need the find ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080227/b5aabaa1/attachment.pgp

author
#2 lore raw

PATCH 1/1 add cscope build target

Quoted 8 lines

-----Original Message-----
From: Mike Frysinger [mailto:vapier at gentoo.org]
Sent: Wednesday, February 27, 2008 6:53 PM
To: u-boot-users at lists.sourceforge.net
Cc: Li Yang; wd at denx.de
Subject: Re: [U-Boot-Users] [PATCH] add cscope build target

On Wednesday 27 February 2008, Li Yang wrote:

Quoted 8 lines

Makefile tags ctags: · line 406

Quoted 4 lines
Makefile +4 -0
+cscope:
+		find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \
+						> cscope.files
+		cscope -b -q -k

isnt the default cscope behavior to scan the working directory for source files ? in other words, why do you need the find ?

The default behavior is to scan only current directory without any subdirectories. A '-R' option will be overkill by including too many files unrelated to a given platform.

- Leo

#3 lore raw

PATCH 1/1 add cscope build target

In reply to Li Yang
Quoted 2 lines · In message <[email protected]> you wrote:

Add cscope build target to generate cscope database for code browsing.

I'm afraid I have to reject this patch because...

Makefile tags ctags: · line 406

Quoted 4 lines
Makefile +4 -0
+cscope:
+		find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \
+						> cscope.files
+		cscope -b -q -k

... if you add rules to create new files you are supposed to also add rules to clean up these files for "make clean" etc.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Swap read error.  You lose your mind.