Skip to contentSkip to conversation

Makefile: Add tags rule

PATCH Applied Stephen Boyd 2 participants 2 messages Jan 26, 2017 – Jan 30, 2017 1 message not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Makefile: Add tags rule

It's useful to have some tags to jump around sources. We don't include test sources in the toplevel Makefile because they probably aren't useful to main program development.

---

I noticed my previous patch wasn't pruning the *.tab.[ch] and *.lex.c files. This version corrects the find command so those aren't included.

 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
Makefile +6 -0
index 32dcfcf8e203..ce05eba6590b 100644
@@ -218,6 +218,12 @@ kup: dist
 		$(KUPDIR)/dtc-$(dtc_version).tar.gz
 endif
 
+tags: FORCE
+	rm -f tags
+	find . \( -name tests -type d -prune \) -o \
+	       \( ! -name '*.tab.[ch]' ! -name '*.lex.c' \
+	       -name '*.[chly]' -type f -print \) | xargs ctags -a
+
 #
 # Testsuite rules
 #
Signature · 1 line
2.10.0.297.gf6727b0

A message that is not in the archive (sent off-list or not yet received): 20170126184814.5325-1-stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org

Applied
#2 lore raw
Quoted 5 lines · Stephen Boyd

It's useful to have some tags to jump around sources. We don't include test sources in the toplevel Makefile because they probably aren't useful to main program development.

Applied, thanks.

Quoted 25 lines

---

I noticed my previous patch wasn't pruning the *.tab.[ch] and *.lex.c files. This version corrects the find command so those aren't included.

 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
Makefile +6 -0
index 32dcfcf8e203..ce05eba6590b 100644
@@ -218,6 +218,12 @@ kup: dist
 		$(KUPDIR)/dtc-$(dtc_version).tar.gz
 endif
 
+tags: FORCE
+	rm -f tags
+	find . \( -name tests -type d -prune \) -o \
+	       \( ! -name '*.tab.[ch]' ! -name '*.lex.c' \
+	       -name '*.[chly]' -type f -print \) | xargs ctags -a
+
 #
 # Testsuite rules
 #
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson