* Makefile patch for cscope and saner Ctags
@ 2001-05-30 22:02 Mark Frazer
2001-05-31 17:45 ` Pete Wyckoff
0 siblings, 1 reply; 9+ messages in thread
From: Mark Frazer @ 2001-05-30 22:02 UTC (permalink / raw)
To: Linux Kernel
The following patch generates saner Ctags and will build cscope
output. It's against 2.4.5
--- Makefile.old Mon May 28 22:44:01 2001
+++ Makefile Wed May 30 17:50:01 2001
@@ -334,11 +334,32 @@
# Exuberant ctags works better with -I
tags: dummy
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "--sort=no -I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
- find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 2 -maxdepth 2 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 3 -maxdepth 3 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 4 -maxdepth 4 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 5 -maxdepth 5 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
+ mv tags tags.unsorted
+ LC_ALL=C sort -k 1,1 -s tags.unsorted > tags
+ rm tags.unsorted
+cscope: dummy
+ find include/asm-$(ARCH) -name '*.h' >cscope.files
+ find include $(SUBDIRS) init -type f -name '*.[ch]' \
+ | grep -v include/asm- | grep -v include/config >> cscope.files
+ cscope -b -I include
+
+
ifdef CONFIG_MODULES
ifdef CONFIG_MODVERSIONS
MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Makefile patch for cscope and saner Ctags
@ 2001-05-31 16:11 Khachaturov, Vassilii
2001-05-31 18:06 ` Mark Frazer
0 siblings, 1 reply; 9+ messages in thread
From: Khachaturov, Vassilii @ 2001-05-31 16:11 UTC (permalink / raw)
To: 'Mark Frazer'; +Cc: Linux Kernel
Great stuff. May I suggest adding -k to the cscope cmdline:
> + cscope -b -I include
should become
+ cscope -b -k -I include
Also, I think you should separate cscope.files creation into a different
rule,
and make the cscope target depend on it and on the files in it. (Like the
stuff
with .flags)
The new .files should be created in a different file, and the old file
shouldn't
be replaced if there's no change.
Lastly, you need to clean up. I think cscope.out should be cleaned up
in the clean target, while the cscope.files should probably should only be
cleaned on rmproper or such.
Vassilii
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Makefile patch for cscope and saner Ctags
2001-05-30 22:02 Mark Frazer
@ 2001-05-31 17:45 ` Pete Wyckoff
2001-05-31 18:17 ` Mark Frazer
0 siblings, 1 reply; 9+ messages in thread
From: Pete Wyckoff @ 2001-05-31 17:45 UTC (permalink / raw)
To: Linux Kernel
mark@somanetworks.com said:
> The following patch generates saner Ctags and will build cscope
> output. It's against 2.4.5
>
> --- Makefile.old Mon May 28 22:44:01 2001
> +++ Makefile Wed May 30 17:50:01 2001
> @@ -334,11 +334,32 @@
>
> # Exuberant ctags works better with -I
> tags: dummy
> - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
> + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "--sort=no -I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
> ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
> - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 2 -maxdepth 2 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 3 -maxdepth 3 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 4 -maxdepth 4 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 5 -maxdepth 5 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
> + mv tags tags.unsorted
> + LC_ALL=C sort -k 1,1 -s tags.unsorted > tags
> + rm tags.unsorted
>
> +cscope: dummy
> + find include/asm-$(ARCH) -name '*.h' >cscope.files
> + find include $(SUBDIRS) init -type f -name '*.[ch]' \
> + | grep -v include/asm- | grep -v include/config >> cscope.files
> + cscope -b -I include
> +
> +
> ifdef CONFIG_MODULES
> ifdef CONFIG_MODVERSIONS
> MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
You seem not to have read my response to your earlier mail proprosing
such a thing (for tags only, not cscope):
http://boudicca.tux.org/hypermail/linux-kernel/2001week21/1869.html
How does the patch above fix anything? You're sorting so that
include/linux/*.h comes before include/linux/{mtd,lockd,raid,...}/*.h,
but I don't see how that can be an improvement, or how it addresses
your original complaint "ctags doesn't honour any CPP #if'ing".
-- Pete
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Makefile patch for cscope and saner Ctags
2001-05-31 16:11 Khachaturov, Vassilii
@ 2001-05-31 18:06 ` Mark Frazer
2001-05-31 18:56 ` george anzinger
0 siblings, 1 reply; 9+ messages in thread
From: Mark Frazer @ 2001-05-31 18:06 UTC (permalink / raw)
To: Khachaturov, Vassilii; +Cc: Linux Kernel
Khachaturov, Vassilii <Vassilii.Khachaturov@comverse.com> [01/05/31 12:12]:
> Great stuff. May I suggest adding -k to the cscope cmdline:
>
> > + cscope -b -I include
>
> should become
> + cscope -b -k -I include
The cscope on my RH7.0 box didn't take -k!
[root@mjftest linux-2.4.5]# ls -l cscope.files
-rw-r--r-- 1 root root 105530 May 30 17:58 cscope.files
[root@mjftest linux-2.4.5]# cscope -b -k -I include
cscope: unknown option: -k
Usage: cscope [-bcCdelLqTuUV] [-f file] [-F file] [-i file] [-I dir] [-s dir]
[-p number] [-P path] [-[0-8] pattern] [source files]
[root@mjftest linux-2.4.5]# which cscope
/usr/bin/cscope
[root@mjftest linux-2.4.5]# rpm -qf /usr/bin/cscope
cscope-13.0-6
weird, as man cscope documents -k's existence
>
> Also, I think you should separate cscope.files creation into a different
> rule,
> and make the cscope target depend on it and on the files in it. (Like the
> stuff
> with .flags)
I didn't see a way to add >>'ing the file to cscope.files without greping
for it's entrance there already. So I've left the find ... method of
creating cscope.files.
cscope.out is now built by a shell command which does the checking
against the age of the files in cscope.files
>
> The new .files should be created in a different file, and the old file
> shouldn't
> be replaced if there's no change.
>
> Lastly, you need to clean up. I think cscope.out should be cleaned up
> in the clean target, while the cscope.files should probably should only be
> cleaned on rmproper or such.
>
> Vassilii
Backout the old patch and try this one.
--- Makefile.old Mon May 28 22:44:01 2001
+++ Makefile Thu May 31 14:02:30 2001
@@ -334,11 +334,41 @@
# Exuberant ctags works better with -I
tags: dummy
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "--sort=no -I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
- find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 2 -maxdepth 2 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 3 -maxdepth 3 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 4 -maxdepth 4 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 5 -maxdepth 5 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
-
+ mv tags tags.unsorted
+ LC_ALL=C sort -k 1,1 -s tags.unsorted > tags
+ rm tags.unsorted
+
+cscope.files:
+ find include/asm-$(ARCH) -name '*.h' >cscope.files
+ find include $(SUBDIRS) init -type f -name '*.[ch]' \
+ | grep -v include/asm- | grep -v include/config >> cscope.files
+
+cscope.out: cscope.files dummy
+ @while read file ; do \
+ if [ $$file -nt cscope.out ] ; then\
+ cscope -b -I include ; \
+ break ; \
+ fi ; \
+ done <cscope.files
+
+.PHONY: scsope
+cscope: cscope.out
+
ifdef CONFIG_MODULES
ifdef CONFIG_MODVERSIONS
MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
@@ -416,7 +446,8 @@
distclean: mrproper
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
- -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
+ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags \
+ cscope.files cscope.out
backup: mrproper
cd .. && tar cf - linux/ | gzip -9 > backup.gz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Makefile patch for cscope and saner Ctags
2001-05-31 17:45 ` Pete Wyckoff
@ 2001-05-31 18:17 ` Mark Frazer
0 siblings, 0 replies; 9+ messages in thread
From: Mark Frazer @ 2001-05-31 18:17 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: Linux Kernel
Pete Wyckoff <pw@osc.edu> [01/05/31 13:56]:
>
> You seem not to have read my response to your earlier mail proprosing
> such a thing (for tags only, not cscope):
>
> http://boudicca.tux.org/hypermail/linux-kernel/2001week21/1869.html
I did. I didn't want to sign up to maintain the ctags-ignore file though.
>
> How does the patch above fix anything? You're sorting so that
> include/linux/*.h comes before include/linux/{mtd,lockd,raid,...}/*.h,
> but I don't see how that can be an improvement, or how it addresses
> your original complaint "ctags doesn't honour any CPP #if'ing".
The sort -s is a stable sort, so by putting things into ctags in the
order I want them to appear in my tags file I get what I want. YMMV
My original complaint ain't gonna get fixed anytime soon.
Your script is definitely a better solution IMO.
-mark
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Makefile patch for cscope and saner Ctags
@ 2001-05-31 18:52 Khachaturov, Vassilii
2001-05-31 20:44 ` Mark Frazer
0 siblings, 1 reply; 9+ messages in thread
From: Khachaturov, Vassilii @ 2001-05-31 18:52 UTC (permalink / raw)
To: 'Mark Frazer'; +Cc: Linux Kernel
> From: Mark Frazer [mailto:mark@somanetworks.com]
> Khachaturov, Vassilii <Vassilii.Khachaturov@comverse.com>
> > Great stuff. May I suggest adding -k to the cscope cmdline:
> > + cscope -b -k -I include
>
> The cscope on my RH7.0 box didn't take -k!
> [root@mjftest linux-2.4.5]# cscope -b -k -I include
> cscope: unknown option: -k
> [root@mjftest linux-2.4.5]# rpm -qf /usr/bin/cscope
> cscope-13.0-6
>
> weird, as man cscope documents -k's existence
Don't forget to bug RH package maintainer on that. Whatever
version they ship (I don't know, maybe 13 indeed didn't have -k)
the mans and the binaries must be consistent.
I use source-built cscope v.15.1, and -k works for me here,
atop RH70 too. You can download it
at http://cscope.sourceforge.net And, the cscope project
guys are very responsive and willing to fix/implement things
in their product.
(BTW, anyone here knows how to submit
a cvsweb patch/bug and get an answer? cvsweb at sourceforge
seems dead, as well as cvsweb.org :-( )
You definitely want -k in the kernel Makefile to avoid
irrelevant things from /usr/include!!!
> I didn't see a way to add >>'ing the file to cscope.files
> without greping
> for it's entrance there already. So I've left the find ... method of
> creating cscope.files.
Sorry for being unclear. I meant: output the new find results into smth like
.cscope.files, then compare (cmp -s) it to the current cscope.files,
and replace the latter with it ONLY if there were diffs:
> > The new .files should be created in a different file, and the old file
> > shouldn't be replaced if there's no change.
> cscope.out is now built by a shell command which does the checking
> against the age of the files in cscope.files
WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
cscope.out
dependencies? Or, maybe better yet,
cscope.make: cscope.files
echo -n 'cscope.out: ' > .$@
cat $< >> .$@
mv .$@ $@
include cscope.make
(or should it be `-include' here?)
> Backout the old patch and try this one.
[patch mostly snipped]
> +.PHONY: scsope
[patch mostly snipped]
s/scs/csc/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Makefile patch for cscope and saner Ctags
2001-05-31 18:06 ` Mark Frazer
@ 2001-05-31 18:56 ` george anzinger
0 siblings, 0 replies; 9+ messages in thread
From: george anzinger @ 2001-05-31 18:56 UTC (permalink / raw)
To: Mark Frazer; +Cc: Khachaturov, Vassilii, Linux Kernel
I really am interested in the cscope stuff, however, the mailers (yours,
mine...) are slicing and dicing. Could you make the patch an
attachment?
George
Mark Frazer wrote:
>
> Khachaturov, Vassilii <Vassilii.Khachaturov@comverse.com> [01/05/31 12:12]:
> > Great stuff. May I suggest adding -k to the cscope cmdline:
> >
> > > + cscope -b -I include
> >
> > should become
> > + cscope -b -k -I include
>
> The cscope on my RH7.0 box didn't take -k!
> [root@mjftest linux-2.4.5]# ls -l cscope.files
> -rw-r--r-- 1 root root 105530 May 30 17:58 cscope.files
> [root@mjftest linux-2.4.5]# cscope -b -k -I include
> cscope: unknown option: -k
> Usage: cscope [-bcCdelLqTuUV] [-f file] [-F file] [-i file] [-I dir] [-s dir]
> [-p number] [-P path] [-[0-8] pattern] [source files]
> [root@mjftest linux-2.4.5]# which cscope
> /usr/bin/cscope
> [root@mjftest linux-2.4.5]# rpm -qf /usr/bin/cscope
> cscope-13.0-6
>
> weird, as man cscope documents -k's existence
>
> >
> > Also, I think you should separate cscope.files creation into a different
> > rule,
> > and make the cscope target depend on it and on the files in it. (Like the
> > stuff
> > with .flags)
>
> I didn't see a way to add >>'ing the file to cscope.files without greping
> for it's entrance there already. So I've left the find ... method of
> creating cscope.files.
>
> cscope.out is now built by a shell command which does the checking
> against the age of the files in cscope.files
>
> >
> > The new .files should be created in a different file, and the old file
> > shouldn't
> > be replaced if there's no change.
> >
> > Lastly, you need to clean up. I think cscope.out should be cleaned up
> > in the clean target, while the cscope.files should probably should only be
> > cleaned on rmproper or such.
> >
> > Vassilii
>
> Backout the old patch and try this one.
>
> --- Makefile.old Mon May 28 22:44:01 2001
> +++ Makefile Thu May 31 14:02:30 2001
> @@ -334,11 +334,41 @@
>
> # Exuberant ctags works better with -I
> tags: dummy
> - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
> + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "--sort=no -I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
> ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
> - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 2 -maxdepth 2 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 3 -maxdepth 3 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 4 -maxdepth 4 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> + find include -type f -name '*.h' -mindepth 5 -maxdepth 5 \
> + | grep -v include/asm- | grep -v include/config \
> + | xargs -r ctags $$CTAGSF -a && \
> find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
> -
> + mv tags tags.unsorted
> + LC_ALL=C sort -k 1,1 -s tags.unsorted > tags
> + rm tags.unsorted
> +
> +cscope.files:
> + find include/asm-$(ARCH) -name '*.h' >cscope.files
> + find include $(SUBDIRS) init -type f -name '*.[ch]' \
> + | grep -v include/asm- | grep -v include/config >> cscope.files
> +
> +cscope.out: cscope.files dummy
> + @while read file ; do \
> + if [ $$file -nt cscope.out ] ; then\
> + cscope -b -I include ; \
> + break ; \
> + fi ; \
> + done <cscope.files
> +
> +.PHONY: scsope
> +cscope: cscope.out
> +
> ifdef CONFIG_MODULES
> ifdef CONFIG_MODVERSIONS
> MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
> @@ -416,7 +446,8 @@
> distclean: mrproper
> rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
> -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
> - -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
> + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags \
> + cscope.files cscope.out
>
> backup: mrproper
> cd .. && tar cf - linux/ | gzip -9 > backup.gz
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Makefile patch for cscope and saner Ctags
2001-05-31 18:52 Makefile patch for cscope and saner Ctags Khachaturov, Vassilii
@ 2001-05-31 20:44 ` Mark Frazer
0 siblings, 0 replies; 9+ messages in thread
From: Mark Frazer @ 2001-05-31 20:44 UTC (permalink / raw)
To: Khachaturov, Vassilii; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
Khachaturov, Vassilii <Vassilii.Khachaturov@comverse.com> [01/05/31 15:00]:
> Don't forget to bug RH package maintainer on that. Whatever
bugzilla submitted
> I use source-built cscope v.15.1, and -k works for me here,
works for me too!
> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
I only have a yellow belt in makefile kungfu. These fancy gnu make things
are relatively new to some of us...
The latest patch is attached. include/linux/compile.h seems to get
built whenever I run make, so that's why I've excluded it from the deps
for cscope.out.
[-- Attachment #2: patch.Makefile --]
[-- Type: text/plain, Size: 2439 bytes --]
--- Makefile.old Mon May 28 22:44:01 2001
+++ Makefile Thu May 31 16:29:38 2001
@@ -334,10 +334,41 @@
# Exuberant ctags works better with -I
tags: dummy
- CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+ CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "--sort=no -I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
- find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 2 -maxdepth 2 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 3 -maxdepth 3 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 4 -maxdepth 4 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
+ find include -type f -name '*.h' -mindepth 5 -maxdepth 5 \
+ | grep -v include/asm- | grep -v include/config \
+ | xargs -r ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.c' | xargs ctags $$CTAGSF -a
+ mv tags tags.unsorted
+ LC_ALL=C sort -k 1,1 -s tags.unsorted > tags
+ rm tags.unsorted
+
+cscope.files: dummy
+ @find include/asm-$(ARCH) -name '*.h' >.cscope.files
+ @find include $(SUBDIRS) init -type f -name '*.[ch]' \
+ | grep -v include/asm- | grep -v include/config >> .cscope.files
+ @[ -f cscope.files ] || touch cscope.files
+ @if cmp -s .cscope.files cscope.files ; then \
+ /bin/rm .cscope.files ; \
+ else \
+ rm cscope.files ; mv .cscope.files cscope.files ; \
+ fi
+
+.PHONY: cscope
+cscope: cscope.out
+cscope.out: cscope.files \
+ $(shell [ -f cscope.files ] && grep -v include/linux/compile.h cscope.files)
+ cscope -k -b -I include
ifdef CONFIG_MODULES
ifdef CONFIG_MODVERSIONS
@@ -416,7 +447,8 @@
distclean: mrproper
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
- -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
+ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags \
+ cscope.files cscope.out
backup: mrproper
cd .. && tar cf - linux/ | gzip -9 > backup.gz
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Makefile patch for cscope and saner Ctags
@ 2001-06-01 18:39 Khachaturov, Vassilii
0 siblings, 0 replies; 9+ messages in thread
From: Khachaturov, Vassilii @ 2001-06-01 18:39 UTC (permalink / raw)
To: 'Mark Frazer'
Cc: 'Pete Wyckoff', Linux Kernel, 'kaos@ocs.com.au'
cscope:
Minor stuff:
1) in cscope.files - I'd be replacing cscope.files with $@ within the rule -
you don't need a yellow belt to know $@ within a Makefile
2) /bin/rm vs rm
tags: Not going deep into it, I possibly should say here that hardwiring
depth 5 is not the best thing probably - once someone extends down to 6,
this place in the Makefile will for sure not be updated. You can make a loop
here to max depth, which you can discover right here, rather than the
current manually unrolled loop.
In general, I am not a tags user in the kernel (sticking to local tags +
global cscope), so I'd be happy if you and
Pete could merge together your tags stuff. As for the ignore list, I don't
see much of maintenance work there - and, if you guys think there is, maybe
it is just possible to add Pete on the Kernel Build maintainers WRT to that
file?
Overall, IMHO, after you give it the last touch (maybe just dismissing my
present letter :-) ) the cscope stuff is mature enough for going to KO & Co.
(i.e. the kernel build guys); I don't consider myself a hardcore tags user
to say so about the tags portion.
Keith, what do you think?
Vassilii
> -----Original Message-----
> From: Mark Frazer [mailto:mark@somanetworks.com]
> Sent: Thursday, May 31, 2001 4:45 PM
> To: Khachaturov, Vassilii
> Cc: Linux Kernel
> Subject: Re: Makefile patch for cscope and saner Ctags
>
>
> Khachaturov, Vassilii <Vassilii.Khachaturov@comverse.com>
> [01/05/31 15:00]:
> > Don't forget to bug RH package maintainer on that. Whatever
>
> bugzilla submitted
>
> > I use source-built cscope v.15.1, and -k works for me here,
>
> works for me too!
>
> > WHY?! Isn't it better to put $(shell cat cscope.files) on
> the list of
>
> I only have a yellow belt in makefile kungfu. These fancy
> gnu make things
> are relatively new to some of us...
>
> The latest patch is attached. include/linux/compile.h seems to get
> built whenever I run make, so that's why I've excluded it
> from the deps
> for cscope.out.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-06-01 18:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-31 18:52 Makefile patch for cscope and saner Ctags Khachaturov, Vassilii
2001-05-31 20:44 ` Mark Frazer
-- strict thread matches above, loose matches on Subject: below --
2001-06-01 18:39 Khachaturov, Vassilii
2001-05-31 16:11 Khachaturov, Vassilii
2001-05-31 18:06 ` Mark Frazer
2001-05-31 18:56 ` george anzinger
2001-05-30 22:02 Mark Frazer
2001-05-31 17:45 ` Pete Wyckoff
2001-05-31 18:17 ` Mark Frazer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox