Skip to content

Commit

Permalink
[PATCH] kbuild: make 'cscope -q' play well with cscope.el
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
Karl Hegbloom authored and Sam Ravnborg committed Jul 13, 2005
1 parent d2cb1a9 commit acbef45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1177,10 +1177,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)
Expand Down

0 comments on commit acbef45

Please sign in to comment.