qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./
@ 2008-10-01 15:10 Ryan Harper
  2008-10-01 15:22 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Harper @ 2008-10-01 15:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ryan Harper

When using cscope integrated in $EDITOR, none of the commands seemed to work
even though make cscope generated the proper data.  Comparing the filelist that
is generated in QEMU's Makefile with what is generated from the Linux kernel's
make cscope, I noticed that the kernel's cscope filelist does not contain any
leading './' as is generated by the find command used in QEMU's make cscope.
Stripping the leading ./ out of the filelist fixes cscope function in $EDITOR.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>

diff --git a/Makefile b/Makefile
index d57f791..cde8676 100644
--- a/Makefile
+++ b/Makefile
@@ -261,7 +261,7 @@ TAGS:
 
 cscope:
 	rm -f ./cscope.*
-	find . -name "*.[ch]" -print > ./cscope.files
+	find . -name "*.[ch]" -print | sed 's,./,,' > ./cscope.files
 	cscope -b
 
 # documentation

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./
  2008-10-01 15:10 [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./ Ryan Harper
@ 2008-10-01 15:22 ` Andreas Schwab
  2008-10-01 15:29   ` Ryan Harper
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2008-10-01 15:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ryan Harper

Ryan Harper <ryanh@us.ibm.com> writes:

> -	find . -name "*.[ch]" -print > ./cscope.files
> +	find . -name "*.[ch]" -print | sed 's,./,,' > ./cscope.files

This will also match 'a/'.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./
  2008-10-01 15:22 ` Andreas Schwab
@ 2008-10-01 15:29   ` Ryan Harper
  2008-10-01 15:36     ` Laurent Desnogues
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Harper @ 2008-10-01 15:29 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Ryan Harper, qemu-devel

* Andreas Schwab <schwab@suse.de> [2008-10-01 10:23]:
> Ryan Harper <ryanh@us.ibm.com> writes:
> 
> > -	find . -name "*.[ch]" -print > ./cscope.files
> > +	find . -name "*.[ch]" -print | sed 's,./,,' > ./cscope.files
> 
> This will also match 'a/'.

Is there a case where the find command we're using would output
something without './' in the first to characters in each line where
that case would be an issue?

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@us.ibm.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./
  2008-10-01 15:29   ` Ryan Harper
@ 2008-10-01 15:36     ` Laurent Desnogues
  2008-10-01 21:45       ` Aurelien Jarno
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Desnogues @ 2008-10-01 15:36 UTC (permalink / raw)
  To: qemu-devel

On Wed, Oct 1, 2008 at 5:29 PM, Ryan Harper <ryanh@us.ibm.com> wrote:
> * Andreas Schwab <schwab@suse.de> [2008-10-01 10:23]:
>> Ryan Harper <ryanh@us.ibm.com> writes:
>>
>> > -   find . -name "*.[ch]" -print > ./cscope.files
>> > +   find . -name "*.[ch]" -print | sed 's,./,,' > ./cscope.files
>>
>> This will also match 'a/'.
>
> Is there a case where the find command we're using would output
> something without './' in the first to characters in each line where
> that case would be an issue?

Why not using  sed 's,^\./,,'?


Laurent

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./
  2008-10-01 15:36     ` Laurent Desnogues
@ 2008-10-01 21:45       ` Aurelien Jarno
  0 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2008-10-01 21:45 UTC (permalink / raw)
  To: qemu-devel

On Wed, Oct 01, 2008 at 05:36:29PM +0200, Laurent Desnogues wrote:
> On Wed, Oct 1, 2008 at 5:29 PM, Ryan Harper <ryanh@us.ibm.com> wrote:
> > * Andreas Schwab <schwab@suse.de> [2008-10-01 10:23]:
> >> Ryan Harper <ryanh@us.ibm.com> writes:
> >>
> >> > -   find . -name "*.[ch]" -print > ./cscope.files
> >> > +   find . -name "*.[ch]" -print | sed 's,./,,' > ./cscope.files
> >>
> >> This will also match 'a/'.
> >
> > Is there a case where the find command we're using would output
> > something without './' in the first to characters in each line where
> > that case would be an issue?
> 
> Why not using  sed 's,^\./,,'?
> 

I applied this version, thanks.


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-01 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 15:10 [Qemu-devel] [PATCH] Fix cscope filelist by removing leading ./ Ryan Harper
2008-10-01 15:22 ` Andreas Schwab
2008-10-01 15:29   ` Ryan Harper
2008-10-01 15:36     ` Laurent Desnogues
2008-10-01 21:45       ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).