diff --git a/.vimrc b/.vimrc index 8867219..25d6883 100644 --- a/.vimrc +++ b/.vimrc @@ -272,8 +272,9 @@ if has("cscope") " add any cscope database in current directory if filereadable("cscope.out") cscope add cscope.out + endif " add the database pointed by environment variable - elseif $CSCOPE_DB != "" + if $CSCOPE_DB != "" if filereadable($CSCOPE_DB) cscope add $CSCOPE_DB endif diff --git a/.zsh/host:kirkwood/Environment.zsh b/.zsh/host:kirkwood/Environment.zsh index a7a4db9..510da86 100755 --- a/.zsh/host:kirkwood/Environment.zsh +++ b/.zsh/host:kirkwood/Environment.zsh @@ -21,7 +21,7 @@ export PATH=$OEBASE/bitbake/bin:$PATH # Scratchbox export PATH=/home/mathieu/bin/sb2/bin:$PATH - +export CSCOPE_DB=$HOME/cscope/cscope.out #emacsAndViKeys #bindkey -v #bindkey "^P" vi-up-line-or-history diff --git a/HOWTO_CSCOPEDB b/HOWTO_CSCOPEDB new file mode 100644 index 0000000..940a1ba --- /dev/null +++ b/HOWTO_CSCOPEDB @@ -0,0 +1,3 @@ +find /my/project/dir -name '*.c' -o -name '*.h' > /foo/cscope.files +cscope -i /foo/cscope.files +CSCOPE_DB=/foo/cscope.out; export CSCOPE_DB