From bdc6abd0b4d58540363a5c387ad2971f08d373fd Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Thu, 26 Jul 2018 11:11:02 -0700 Subject: [PATCH] Enable cscope to exclude test source files (#4190) Summary: Usually when using cscope, the query results contain a lot of function calls in test, making it hard to browse. So this PR aims to provide an option to exclude test source files. Add a new PHONY target, tags0, to exclude test source files while using cscope. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4190 Differential Revision: D9015901 Pulled By: riversand963 fbshipit-source-id: ea9a45756ccff5b26344d37e9ff1c02c5d9736d6 --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index de9ebf3a9..f039fd498 100644 --- a/Makefile +++ b/Makefile @@ -666,7 +666,7 @@ $(SHARED4): $(shared_all_libobjects) endif # PLATFORM_SHARED_EXT .PHONY: blackbox_crash_test check clean coverage crash_test ldb_tests package \ - release tags valgrind_check whitebox_crash_test format static_lib shared_lib all \ + release tags tags0 valgrind_check whitebox_crash_test format static_lib shared_lib all \ dbg rocksdbjavastatic rocksdbjava install install-static install-shared uninstall \ analyze tools tools_lib @@ -1019,6 +1019,13 @@ tags: cscope -b `$(FIND) . -name '*.cc'` `$(FIND) . -name '*.h'` `$(FIND) . -name '*.c'` ctags -e -R -o etags * +tags0: + ctags -R . + cscope -b `$(FIND) . -name '*.cc' -and ! -name '*_test.cc'` \ + `$(FIND) . -name '*.c' -and ! -name '*_test.c'` \ + `$(FIND) . -name '*.h' -and ! -name '*_test.h'` + ctags -e -R -o etags * + format: build_tools/format-diff.sh