Where should I insert “etags -R .” in makefile?

2019-09-06 23:29发布

问题:

I am writing a compiler in Ocaml...

I am just wondering at which stage it is most convenient to generate the tags... I guess it should not be after the compilation of all files, because it is possible that the compilation fails, and it still makes sense to get tags.

Where do you usually put etags in makefile?

回答1:

I put tag generation on a separate target. When I want to generate an executable, I don't care about tags. When I'm working on the source code, I might want to regenerate the tags even if I know my code won't compile right now.