* PATCH Makefile, Make 'cscope -q' play well with cscope.el
@ 2005-06-19 7:50 Karl Hegbloom
2005-07-13 21:47 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Karl Hegbloom @ 2005-06-19 7:50 UTC (permalink / raw)
To: Kai Germaschewski, Sam Ravnborg; +Cc: linux-kernel
LinuxVersion: 2.6-git 2005/06/19
I tried the Linux Makefile 'make cscope' target, and found that the
generated database is not compatible with 'cscope.el' under XEmacs.
The thing is that 'cscope.el' does not allow setting the command line
options to the 'cscope' commands it runs, and it errors with a message
about the options not matching the ones used to generate the index.
It turns out the cscope designers already thought of this. The
options can be written into the "cscope.files". The included patch
moves the "-q" and "-k" options from the 'cmd_cscope' to the
'cmd_cscope-file', echoing them into the top of the files listing.
Now the index is generated with the "-q" option, and when 'cscope.el'
performs it's search, it uses that argument as well. Lookups are fast
and everyone is happy.
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1173,10 +1173,10 @@ define all-sources
endef
quiet_cmd_cscope-file = FILELST cscope.files
- cmd_cscope-file = $(all-sources) > cscope.files
+ cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
quiet_cmd_cscope = MAKE cscope.out
- cmd_cscope = cscope -k -b -q
+ cmd_cscope = cscope -b
cscope: FORCE
$(call cmd,cscope-file)
I sent a previous patch for this, but it is wrong, since I had placed
the 'echo' statements directly inside of 'all-sources'. If
'all-sources' is used anyplace else in the Makefile, that would lead
to file not found errors. This patch corrects that mistake.
[ I am not currently a subscriber to LKML. ]
--
Karl Hegbloom <hegbloom@pdx.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH Makefile, Make 'cscope -q' play well with cscope.el
2005-06-19 7:50 PATCH Makefile, Make 'cscope -q' play well with cscope.el Karl Hegbloom
@ 2005-07-13 21:47 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2005-07-13 21:47 UTC (permalink / raw)
To: Karl Hegbloom; +Cc: Kai Germaschewski, linux-kernel
On Sun, Jun 19, 2005 at 12:50:47AM -0700, Karl Hegbloom wrote:
> LinuxVersion: 2.6-git 2005/06/19
>
> I tried the Linux Makefile 'make cscope' target, and found that the
> generated database is not compatible with 'cscope.el' under XEmacs.
> The thing is that 'cscope.el' does not allow setting the command line
> options to the 'cscope' commands it runs, and it errors with a message
> about the options not matching the ones used to generate the index.
>
> It turns out the cscope designers already thought of this. The
> options can be written into the "cscope.files". The included patch
> moves the "-q" and "-k" options from the 'cmd_cscope' to the
> 'cmd_cscope-file', echoing them into the top of the files listing.
>
> Now the index is generated with the "-q" option, and when 'cscope.el'
> performs it's search, it uses that argument as well. Lookups are fast
> and everyone is happy.
Applied - thanks.
Sam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-13 20:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-19 7:50 PATCH Makefile, Make 'cscope -q' play well with cscope.el Karl Hegbloom
2005-07-13 21:47 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®