Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile utility targets for tags #4195

Open
mc-butler opened this issue Feb 8, 2021 · 5 comments
Open

Makefile utility targets for tags #4195

mc-butler opened this issue Feb 8, 2021 · 5 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4195
Reporter psprint (sg44567@….com)
Keywords ctags, tags, makefile, make

Hi,
the patch adds three Makefile targets:

  • tags-emacs, which generates the TAGS file ↔ the Emacs style tags (actually used by mcedit),
  • tags-vim, which generates the tags file with Vim-style tags,
  • tags, which generates both above,

… from a curated, well done ctags command invocation, with all the needed options like the recursion and search for C sources and e.g.: proper parsing of the headers (.h). The command is in two forms, first for Exuberant Ctags and the second one for Universal Ctags (there's a check for which one is being found).

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by psprint (sg44567@….com) on Feb 8, 2021 at 22:20 UTC

@mc-butler
Copy link
Author

Changed by psprint (sg44567@….com) on Feb 17, 2021 at 7:32 UTC

Added extra tags for #include macros

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 18, 2021 at 13:02 UTC (comment 1)

Unfortunately, this patch is useless if out-of-source build is used.

@mc-butler
Copy link
Author

Changed by psprint (sg44567@….com) on Feb 18, 2021 at 14:13 UTC (comment 2)

I do not understand, could you please explain? Out-of-source build means AFAIK putting compiled objects in a subfolder and I don't see conflict with running ctags via top level Makefile?

The patch is of lesser importance, I thought that such targets would be cool and I'd sent it mostly for my own convenience…

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 19, 2021 at 6:57 UTC (comment 2.3)

Replying to psprint:

Out-of-source build means AFAIK putting compiled objects in a subfolder

Build tree can be located in any place as far from source tree as you wish.

and I don't see conflict with running ctags via top level Makefile?

Top level Makefile created in the build tree, not in the source one. In the build tree, there are no c/h files excepting config.h, and only config.h is found by ctags.

BTW, the automake's built-in target ctags doesn't support of out-of-source build either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

1 participant