diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-23 13:02:14 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-23 13:07:10 -0500 |
| commit | 7fbc7d3055458b7b3633d4a95ee344490dc3473e (patch) | |
| tree | 250e2e49405e07487f4a68e40f3f9a9db6fbdb8b | |
| parent | f4e7afec1e28e7fa2be397a3f3f63b40061f24b7 (diff) | |
add cscope target to Makefile
cscope is very nice for exploring the library and finding related
code. Let's support it by pre-building an index of all files.
| -rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -73,7 +73,7 @@ all = lib ${rt-apps} | |||
| 73 | rt-apps = cycles base_task rt_launch rtspin release_ts measure_syscall \ | 73 | rt-apps = cycles base_task rt_launch rtspin release_ts measure_syscall \ |
| 74 | base_mt_task runtests | 74 | base_mt_task runtests |
| 75 | 75 | ||
| 76 | .PHONY: all lib clean dump-config TAGS tags | 76 | .PHONY: all lib clean dump-config TAGS tags cscope |
| 77 | 77 | ||
| 78 | all: ${all} inc/config.makefile | 78 | all: ${all} inc/config.makefile |
| 79 | 79 | ||
| @@ -116,7 +116,7 @@ clean: | |||
| 116 | rm -f *.o *.d *.a test_catalog.inc | 116 | rm -f *.o *.d *.a test_catalog.inc |
| 117 | rm -f ${imported-headers} | 117 | rm -f ${imported-headers} |
| 118 | rm -f inc/config.makefile | 118 | rm -f inc/config.makefile |
| 119 | rm -f tags TAGS | 119 | rm -f tags TAGS cscope.files cscope.out |
| 120 | 120 | ||
| 121 | # Emacs Tags | 121 | # Emacs Tags |
| 122 | TAGS: | 122 | TAGS: |
| @@ -128,6 +128,12 @@ tags: | |||
| 128 | @echo tags | 128 | @echo tags |
| 129 | @find . -type f -and -iname '*.[ch]' | xargs ctags | 129 | @find . -type f -and -iname '*.[ch]' | xargs ctags |
| 130 | 130 | ||
| 131 | # cscope DB | ||
| 132 | cscope: | ||
| 133 | @echo cscope | ||
| 134 | @find . -type f -and -iname '*.[ch]' | xargs printf "%s\n" > cscope.files | ||
| 135 | @cscope -b | ||
| 136 | |||
| 131 | # ############################################################################## | 137 | # ############################################################################## |
| 132 | # Kernel headers. | 138 | # Kernel headers. |
| 133 | # The kernel does not like being #included directly, so let's | 139 | # The kernel does not like being #included directly, so let's |
