[Top][All Lists]

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

Re: Bug Report (Feature request?) etags (GNU Emacs 21.1)

From: David Masterson
Subject: Re: Bug Report (Feature request?) etags (GNU Emacs 21.1)
Date: 19 Feb 2002 10:13:53 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> Francesco Potorti` writes:

David> words, would etags wind up generating the same reference twice
David> (once from the generated file and once from the original)?
>> etags will already do this if you run it on parse.y and parse.c.
>> I've always found this a bit annoying.  Usually I use some Makefile
>> rule I didn't write to generate TAGS.  So parse.c is included, but
>> I don't want it, since I never want to edit it.  In this scenario
>> it would be convenient if etags ignored the generated file.

> I suppose you mean a rule like this:

> if etags finds a #line directive in file X pointing to file Y, and
> if file Y is given on the command line, then ignore file X.

No.  It would have to go further than that.  Because of limitations in
the shell command line, file X may not be on the etags command line.

> Maybe this would better be handled by not giving file X to etags to
> parse.  Should etags correct this common makefile error?  By the
> way, it wouldn't be so easy, as currently etags processes files
> independently of each other, in sequence.

Actually, it should be easy.  Include an option "--ignore-gen-files"
which means that etags should ignore any generated file.  A parameter
to this option would be a regexp pattern that could be used to check a
line to see if the file is generated (default would be "#line").  This
option should also be settable as an environment variable (because
some people have to deal with Makefiles that they cannot change).

> Going back to the original question, what happens if you give to
> etags the original .web file, instead of the .c produced from it?

Again, in large projects, you might run a recursive etags in a
directory and accidently pick up both.  Given the size of the project,
it may be sometime before you realize it.  It can be worked around,
but it can be annoying.

David Masterson                dmaster AT synopsys DOT com
Sr. R&D Engineer               Synopsys, Inc.
Software Engineering           Sunnyvale, CA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]