[PATCH ocserv] add cscope/ctags make targets

Jason Cooper jason at lakedaemon.net
Tue Feb 26 11:49:57 EST 2013


Newcomers to the code often use these tools to learn their way around.
Integrate them into the build so that we don't accidentally track their
files.

Signed-off-by: Jason Cooper <jason at lakedaemon.net>
---
The location of my additions to configure.ac might not be ideal.  I think it's
purely cosmetic, though.  Let me know if I need to spin a v2.

 .gitignore   | 2 ++
 Makefile.am  | 7 +++++++
 configure.ac | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/.gitignore b/.gitignore
index b1f6fdb..c9822cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,8 @@ config.h
 config.log
 Makefile
 Makefile.in
+cscope.out
+tags
 .deps
 stamp-h1
 *.o
diff --git a/Makefile.am b/Makefile.am
index c6900a3..e327ddc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,3 +4,10 @@ SUBDIRS = gl libopts src doc
 
 ACLOCAL_AMFLAGS = -I gl/m4 -I libopts/m4 -I m4
 
+ctags:
+	find . -type f -name "*.[ch]*" | xargs @CTAGS@
+
+cscope:
+	@CSCOPE@ -b -R
+
+cref: ctags cscope
diff --git a/configure.ac b/configure.ac
index cee1e08..af206c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,8 @@ AC_PREREQ(2.61)
 AC_INIT([ocserv], [0.0.1], [nmav at gnutls.org])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
+AC_PATH_PROG(CTAGS, ctags, /bin/true)
+AC_PATH_PROG(CSCOPE, cscope, /bin/true)
 
 AM_INIT_AUTOMAKE([1.11.3 no-dist-gzip dist-xz dist-lzip -Wall -Wno-override])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-- 
1.8.1.4




More information about the openconnect-devel mailing list