From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Cc: Vladislav Valtchev <vladislav.valtchev@gmail.com>,
Yordan Karadzhov <y.karadz@gmail.com>
Subject: [PATCH 3/3] trace-cmd TAGS: Fix tags to not parse .pc directory of patch
Date: Fri, 12 Jan 2018 13:08:50 -0500 [thread overview]
Message-ID: <20180112180930.593490856@goodmis.org> (raw)
In-Reply-To: 20180112180847.372748598@goodmis.org
[-- Attachment #1: 0003-trace-cmd-TAGS-Fix-tags-to-not-parse-.pc-directory-o.patch --]
[-- Type: text/plain, Size: 1493 bytes --]
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
When working on some code, I use quilt to develop to save off patchs to push
and pop my current work. quilt will create a .pc directory to store the
original files that are being worked on. Unfortunately, the current code
that creates TAGS will decend into this directory and include it when doing
code searching via emacs or vim. If one is not careful, they can end up
editing the saved quilt original file and not the file they should be
editing.
Add a find_tag_files define that limits the scope of where TAGS will get its
code to examine.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index b7bb3cce1258..e620d578140b 100644
--- a/Makefile
+++ b/Makefile
@@ -537,17 +537,22 @@ show_gui_done:
PHONY += show_gui_make
+define find_tag_files
+ find . -name '\.pc' -prune -o -name '*\.[ch]' \
+ ! -name '\.#' -print
+endef
+
tags: force
$(RM) tags
- find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px
+ $(call find_tag_files) | xargs ctags --extra=+f --c-kinds=+px
TAGS: force
$(RM) TAGS
- find . -name '*.[ch]' | xargs etags
+ $(call find_tag_files) | xargs etags
cscope: force
$(RM) cscope*
- find . -name '*.[ch]' | cscope -b -q
+ $(call find_tag_files) | cscope -b -q
PLUGINS_INSTALL = $(subst .so,.install,$(PLUGINS)) $(subst .so,.install,$(PYTHON_PLUGINS))
--
2.13.2
prev parent reply other threads:[~2018-01-12 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 18:08 [PATCH 0/3] trace-cmd: A few fixes Steven Rostedt
2018-01-12 18:08 ` [PATCH 1/3] trace-cmd: Fix leaking of port_array memory Steven Rostedt
2018-01-12 18:08 ` [PATCH 2/3] trace-cmd msg: Set the min size of a message on init Steven Rostedt
2018-01-12 18:08 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180112180930.593490856@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=vladislav.valtchev@gmail.com \
--cc=y.karadz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).