summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Otubo <otubo@linux.vnet.ibm.com>2012-03-22 15:04:09 -0300
committerPaul Moore <pmoore@redhat.com>2012-03-22 16:43:04 -0400
commitdb745b09caca179f3412fff93995b34dd18b082c (patch)
tree9724cd788c360c5e0098aa474991e10057e86ca1
parent7e5d6ca962a25959ce813e2acf02a16d802d44c0 (diff)
downloadlibseccomp-db745b09caca179f3412fff93995b34dd18b082c.tar.gz
build: add simple support for tags
Now you can use either ctags or cscope to index the source code. Simple support on the Makefile. Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com> Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r--.gitignore1
-rw-r--r--Makefile11
2 files changed, 11 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 50a533a..d8a25e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
*.orig
.stgit-*
cscope.*
+tags
diff --git a/Makefile b/Makefile
index 9cefe7c..5ee437c 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ INSTALL_GROUP ?= root
SUBDIRS = src tests tools
-.PHONY: tarball install clean $(SUBDIRS)
+.PHONY: tarball install ctags cstags clean $(SUBDIRS)
all: $(SUBDIRS)
@@ -79,6 +79,15 @@ $(SUBDIRS): $(VERSION_HDR)
@echo "INFO: entering directory $@/ ..."
@$(MAKE) -s -C $@
+ctags:
+ @echo "INFO: generating ctags for the project ..."
+ @ctags -R *
+
+cstags:
+ @echo "INFO: generating cscope tags for the project ..."
+ @find -iname *.[ch] > cscope.files
+ @cscope -b -q -k
+
clean:
@echo "INFO: removing the version header file"; \
rm -f $(VERSION_HDR)