From: Karl Hegbloom <hegbloom@pdx.edu>
To: Kai Germaschewski <kai@germaschewski.name>,
Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org
Subject: PATCH Makefile, Make 'cscope -q' play well with cscope.el
Date: Sun, 19 Jun 2005 00:50:47 -0700 [thread overview]
Message-ID: <87br62hjjc.fsf@journeyhawk.karlheg.net> (raw)
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>
next reply other threads:[~2005-06-19 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-19 7:50 Karl Hegbloom [this message]
2005-07-13 21:47 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87br62hjjc.fsf@journeyhawk.karlheg.net \
--to=hegbloom@pdx.edu \
--cc=kai@germaschewski.name \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®