Re: [PATCH] trace-cmd: generate cscope.files when building cscope index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 20, 2020 at 5:33 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Sun, 12 Jan 2020 14:05:37 -0500
> Marcelo Diop-Gonzalez <marcgonzalez@xxxxxxxxxx> wrote:
>
> > Currently, running 'make cscope' gives this output:
>
> Hi Marcelo!
>
> >
> > rm -f cscope*
> > find . -name '\.pc' -prune -o -name '*\.[ch]' -print -o -name '*\.[ch]pp' ! -name '\.#' -print | cscope -b -q
> > cscope: no source files found
> > make: *** [Makefile:351: cscope] Error 1
> >
> > By default, cscope looks in cscope.files for the list of
> > sources, so printing the source file list to this file
> > fixes the above error.
> >
> > Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@xxxxxxxxxx>
> > ---
> >  Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index efd9ed4..0b15bf5 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -348,7 +348,8 @@ TAGS:     force
> >
> >  cscope: force
> >       $(RM) cscope*
> > -     $(call find_tag_files) | cscope -b -q
> > +     $(call find_tag_files) > cscope.files
> > +     cscope -b -q
>
> I think the following should work too, without the need to create an
> extra file:
>
> diff --git a/Makefile b/Makefile
> index efd9ed4b..782df41b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -348,7 +348,7 @@ TAGS:       force
>
>  cscope: force
>         $(RM) cscope*
> -       $(call find_tag_files) | cscope -b -q
> +       $(call find_tag_files) | cscope -b -q -i-

Hi Steven!

I think one problem with this is that it requires that you pass cscope a
list of files to look in when using it after building the index.
Running "cscope"
with no arguments gives the output: "cscope: no source files found", whereas
if cscope.files is populated, running "cscope" lets you look at everything that
went into building the index. For example, I think running "make cscope" inside
a kernel repository will spit out a 'cscope.files' (done in docscope()
in ./scripts/tags.sh).
But I guess it depends on how people usually like to use cscope (I'm
no expert!).
What do you think is best?

Thanks,

-Marcelo
>
>  install_plugins_traceevent: force
>         $(Q)$(MAKE) -C $(src)/lib/traceevent/plugins install_plugins
>
>
> Care to test it out. And feel free to resend this version.
>
> Thanks!
>
> -- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux