I've been fixated on getting cscope to work - I started down the path of trying to figure out everything I need to set in the environment to just get it to run.
In Solaris development, you always do something like:
$ cd /zoo/ws $ ws kanigix
And the 'ws' script sets up all of your environment variables. Thus when you want to build the cscope database:
$ cd $SRC $ make cscope.out tags
And you are off. Well, I was trying to do that in OpenSolaris and failing. I knew $SRC need to be set and I was digging my way deeper into getting it all hacked up. Then I reread the README, which you are supposed to read first, really, the whole thing.
Well I had, several times in the distant past. I've even recently skimmed parts of it to find stuff I needed. I should have reread it all. Anyway, to do what I want is already simple, just use 'bldenv':
[tdh@kanigix onnv-gate.first]> pwd /zoo/ws/onnv-gate.first [tdh@kanigix onnv-gate.first]> bldenv -d ./opensolaris.sh Build type is DEBUG RELEASE is VERSION is kanigix RELEASE_DATE is January 2007 The top-level 'setup' target is available to build headers and tools. Using /bin/tcsh as shell. [tdh@kanigix onnv-gate.first]> cd $SRC [tdh@kanigix src]> make cscope.out tags /zoo/ws/onnv-gate.first/usr/src/tools/proto/opt/onbld/bin/xref -f -x cscope.out xref: usr/src: building cscope cross-reference ... cscope: building symbol index: temporary file size is 250223167 bytes cscope: index has 12814195 references to 629827 symbols xref: usr/src: built cscope cross-reference in 23m00s /zoo/ws/onnv-gate.first/usr/src/tools/proto/opt/onbld/bin/xref -f -x tags xref: usr/src: building ctags cross-reference xref: usr/src: built ctags cross-reference in 4m55s Time spent in user mode (CPU seconds) : 70.00s Time spent in kernel mode (CPU seconds) : 42.30s Total time : 28:02.98s CPU utilisation (percentage) : 6.6%
Pretty slow - I was in the middle of a build. But that should be CPU bound and this IO bound. I'll test an idle system later.
I then use a simple alias to remember the options to invoke it:
alias csf cscope-fast -e -p 3 -d -q
But again, the real morale of the entry is, "Read the README, Really!"