diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-12-16 16:39:49 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2021-12-17 22:07:04 -0500 |
commit | ff03c2ba76353f0f34acece5226d99d8eaff84d9 (patch) | |
tree | 5b7258da0c6029f6f1c65057e487a2c6661f3553 | |
parent | ba30cea26c3cc4b0670bcd36ed16edac6a7fa67c (diff) | |
download | libtraceevent-ff03c2ba76353f0f34acece5226d99d8eaff84d9.tar.gz |
libtraceevent: Have make tags and TAGS honor O= build directory
Currently if one does a "make O=/tmp/build tags" the tags are still built
in the source directory. Although this is uncommon to do, the tags (and
TAGS) target should still honor the build directory.
Link: https://lore.kernel.org/linux-trace-devel/20211216213956.13934-4-rostedt@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | Makefile | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -246,15 +246,22 @@ define update_dir fi); endef -tags: force - $(RM) tags - find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ - --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/' - -TAGS: force - $(RM) TAGS - find . -name '*.[ch]' | xargs etags \ - --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/' +VIM_TAGS = $(obj)/tags +EMACS_TAGS = $(obj)/TAGS + +$(VIM_TAGS): force + $(RM) $(VIM_TAGS) + find $(src) -name '*.[ch]' | (cd $(obj) && xargs ctags --extra=+f --c-kinds=+px \ + --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/') + +tags: $(VIM_TAGS) + +$(EMACS_TAGS): force + $(RM) $(EMACS_TAGS) + find $(src) -name '*.[ch]' | (cd $(obj) && xargs etags \ + --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/') + +TAGS: $(EMACS_TAGS) define build_prefix (echo $1 > $@.tmp; \ |