[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

incorrect ctags target in makefile



Shouldn't ctags be something for Configure to figure out?

We're unrightly assuming the "exhuberant" version of ctags here:

    # This may also fail if . is in the head of the path, since perl will
    # require -Ilib
    tags:   TAGS
	    perl emacs/e2ctags.pl TAGS > tags

    ctags:
	    ctags -f Tags -N --totals --languages=c --langmap=c:+.h --exclude=opmini.c *.c *.h


On BSD systems, you still have the original ctags, so need something 
like "ctags -dtw *.[ch]" there instead.  

Hm, shouldn't it be more careful about what files it uses?
That is, wouldn't the statically loaded extensions go in?
And should miniperl be there:

    % grep ^main tags-ectags
    main    generate_uudmap.c       /^int main() {$/;"      f
    main    miniperlmain.c  /^main(int argc, char **argv)$/;"       f
    main    perlmain.c      /^main(int argc, char **argv)$/;"       f

Or not?

*HOWEVER*, if /usr/ports/devel/ectags is installed, then you get what
you're expecting you can use that as ctags.  But it gets called ectags.

There'S ANOTHER problem, though.  

Sometimes the ectags stuff works with vi, and sometimes it doesn't.
It *does* work with vim, but that's not my first choice.

For example

    % ln -s tags-ectags tags
    % vi -t perl_run
    [happily found]

but 

    % vi -t nuke-stacks
    nuke-stacks: tag not found; /tmp/vi.PDchlr9223: new file: line 1

And looking more closely:

    % grep nuke_stacks tags-{e,}ctags | cat -tev
    tags-ectags:S_nuke_stacks^Iperl.c^I/^S_nuke_stacks(pTHX)$/;"^If$
    tags-ectags:nuke_stacks^Iembed.h^I/^#define nuke_stacks^I/;"^Id$
    tags-ectags:nuke_stacks^Iembed.h^I/^#define nuke_stacks(/;"^Id$
    tags-ctags:nuke_stacks^Iembed.h^I/^#define nuke_stacks^I^IS_nuke_stacks$/$

Similarly, 

    % vi -t perl_key

also fails, as does both :tagnext calls.  The tags file looks like:

    % grep perl_key tags-{e,}ctags | cat -tev
    tags-ectags:perl_key^Ifakethr.h^I/^typedef int perl_key;$/;"^It$
    tags-ectags:perl_key^Iperl.h^I/^typedef pthread_key_t^Iperl_key;$/;"^It$
    tags-ectags:perl_key^Iperl.h^I/^typedef void *^I^Iperl_key;$/;"^It$
    tags-ctags:perl_key^Ifakethr.h^I/^typedef int perl_key;$/$

I'm not sure why, but I think it's the comment at the end with the
type of thingie it is.

    % vim -t perl_key 

works, but there's no :nexttag command.  Blah.

It does work fine with the ctags-generated tagsfile, but not with 
the ectags one.  I wonder if we need the trailing C<;"^It> splizz there.
Of course, ectags is much better in nearly all ways.

Shouldn't this be something for Configure to figure out?

--tom


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]