Skip to contentSkip to conversation

perf tools: consider header files outside perf directory in tags target

PATCH Superseded Sebastian Andrzej Siewior 3 participants 4 messages May 27, 2014 – Jun 5, 2014 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tools: consider header files outside perf directory in tags target

This fixes lookups like "vi -t event_format"

---
 tools/perf/Makefile.perf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +3 -3
index 895edd3..8148992 100644
@@ -812,15 +812,15 @@ INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html
 
 TAGS:
 	$(RM) TAGS
-	$(FIND) . -name '*.[hcS]' -print | xargs etags -a
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs etags -a ../../include/uapi/linux/perf_event.h
 
 tags:
 	$(RM) tags
-	$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs ctags -a ../../include/uapi/linux/perf_event.h
 
 cscope:
 	$(RM) cscope*
-	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs cscope -b ../../include/uapi/linux/perf_event.h
 
 ### Detect prefix changes
 TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):\
Signature · 1 line
2.0.0.rc4
#1 lore raw
Quoted 17 lines · Sebastian Andrzej Siewior

This fixes lookups like "vi -t event_format"

---
 tools/perf/Makefile.perf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +1 -1
index 895edd3..8148992 100644
@@ -812,15 +812,15 @@ INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html
 
 TAGS:
 	$(RM) TAGS
-	$(FIND) . -name '*.[hcS]' -print | xargs etags -a
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs etags -a ../../include/uapi/linux/perf_event.h

tools/perf/Makefile.perf INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html · line 823

Quoted 10 lines
tools/perf/Makefile.perf +2 -2
 
 tags:
 	$(RM) tags
-	$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs ctags -a ../../include/uapi/linux/perf_event.h
 
 cscope:
 	$(RM) cscope*
-	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+	$(FIND) . ../lib/traceevent -name '*.[hcS]' -print | xargs cscope -b ../../include/uapi/linux/perf_event.h

while you are at it, could you please also include:
../lib/api/
../lib/symbol/

also given that same paths are used on multiple places, please put them into variable

thanks,
jirka

#2 lore raw

PATCH v2 1/1 perf tools: consider header files outside perf directory in tags target

This fixes lookups like "vi -t event_format"

---
v1..v2:
- add ../lib/{api|symbol}
- move the files & folders into a variable which can be resued for the three users.

 tools/perf/Makefile.perf | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +6 -3
index 895edd3..90e96ea 100644
@@ -810,17 +810,20 @@ INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html
 $(DOC_TARGETS):
 	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:doc=all)
 
+TAG_FOLDERS= . ../lib/traceevent ../lib/api ../lib/symbol
+TAG_FILES= ../../include/uapi/linux/perf_event.h
+
 TAGS:
 	$(RM) TAGS
-	$(FIND) . -name '*.[hcS]' -print | xargs etags -a
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs etags -a $(TAG_FILES)
 
 tags:
 	$(RM) tags
-	$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs ctags -a $(TAG_FILES)
 
 cscope:
 	$(RM) cscope*
-	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs cscope -b $(TAG_FILES)
 
 ### Detect prefix changes
 TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):\
Signature · 1 line
2.0.0.rc4
#3 lore raw

[tip:perf/core] perf tools: Consider header files outside perf directory in tags target

perf tools: Consider header files outside perf directory in tags target
Commit-ID:  16a6433615c14097fd8d406b10ce6393aebb7017
Gitweb:     http://git.kernel.org/tip/16a6433615c14097fd8d406b10ce6393aebb7017
Author:     Sebastian Andrzej Siewior <[email protected]>
AuthorDate: Wed, 28 May 2014 10:19:18 +0200
Committer:  Jiri Olsa <[email protected]>
CommitDate: Tue, 3 Jun 2014 21:34:23 +0200

perf tools: Consider header files outside perf directory in tags target

This fixes lookups like "vi -t event_format"

---
 tools/perf/Makefile.perf | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
tools/perf/Makefile.perf +6 -3
index 67f7c05..6286e13 100644
@@ -815,17 +815,20 @@ INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html
 $(DOC_TARGETS):
 	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:doc=all)
 
+TAG_FOLDERS= . ../lib/traceevent ../lib/api ../lib/symbol
+TAG_FILES= ../../include/uapi/linux/perf_event.h
+
 TAGS:
 	$(RM) TAGS
-	$(FIND) . -name '*.[hcS]' -print | xargs etags -a
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs etags -a $(TAG_FILES)
 
 tags:
 	$(RM) tags
-	$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs ctags -a $(TAG_FILES)
 
 cscope:
 	$(RM) cscope*
-	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+	$(FIND) $(TAG_FOLDERS) -name '*.[hcS]' -print | xargs cscope -b $(TAG_FILES)
 
 ### Detect prefix changes
 TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):\