[U-Boot-Users] [PATCH] add cscope build target

Add cscope build target to generate cscope database for code browsing.
Signed-off-by: Li Yang leoli@freescale.com --- Makefile | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index d6a0299..1efd33e 100644 --- a/Makefile +++ b/Makefile @@ -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) $< | \

On Wednesday 27 February 2008, Li Yang wrote:
+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

-----Original Message----- From: Mike Frysinger [mailto:vapier@gentoo.org] Sent: Wednesday, February 27, 2008 6:53 PM To: u-boot-users@lists.sourceforge.net Cc: Li Yang; wd@denx.de Subject: Re: [U-Boot-Users] [PATCH] add cscope build target
On Wednesday 27 February 2008, Li Yang wrote:
+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

In message 1204109988-6752-1-git-send-email-leoli@freescale.com you wrote:
Add cscope build target to generate cscope database for code browsing.
I'm afraid I have to reject this patch because...
+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
participants (4)
-
Li Yang
-
Li Yang
-
Mike Frysinger
-
Wolfgang Denk