To index the whole of the source collection, simply invoke the indexer program as follows:
This will read the source files from the directory specified in SCB_SOURCES, write the index files to the directory specified in SCB_INDEX, and print to the screen each index entry as it is encountered. If the entire Starlink source code collection is installed, this will typically take around about an hour of elapsed time. Some indication of how far the indexing has progressed can be seen by looking at which package is currently being indexed (the package name is given before the `#' sign on the printed lines, e.g. lines which look like% scbindex
indicate that the HDS package is being indexed). The packages are dealt with in alphabetical order, so by seeing how far the package currently being examined is through the list of files in the directory SCB_SOURCES you can get a rough idea of how much remains to be done.cmp_activ.f => hds#hds_source.tar>cmp_activ.f cmp_blk.f => hds#hds_source.tar>cmp_blk.f cmp_cct => hds#hds_source.tar>cmp_cct
If only one or a few packages have been changed since the last indexing, then the index can be updated rather than being regenerated from scratch. In this case only the changed packages are named on the command line, e.g.
The packages so named will be taken from the SCB_SOURCES directory in the same way as if the whole source tree is being indexed.% scbindex ast polpack ndf
Alternatively the -update flag can be used:
This will look through the packages in SCB_SOURCES and update the index for only those packages which appear (on the basis of the modification times of the files in the top level of the directory) to have been changed since the last time an was built for them.% scbindex -update
Since indexing the whole Starlink source collection can take a long time, i t will probably be preferable to run it in the background, possibly reniced, with the output redirected elsewhere, e.g.:
If the machine will be used by other people while the indexing is running, then you should seek advice from your system manager about the nice level that ought to be used.% nice +4 scbindex >& scbindex.log &
While the indexing is taking place, the index files may (depending on the implementation of the database libraries on your system) be unreadable, so that the browser program ceases to work. To maintain the browser service during an update of the index in this case, it will be necessary to update a copy, and write it over the original when it is complete, like this:
Use of the scbcp utility is explained in section 6.2.% setenv SCB_INDEX /usr/tmp/tmp_index % mkdir $SCB_INDEX % scbcp /star/etc/scb $SCB_INDEX % scbindex pack1 pack2 % scbcp $SCB_INDEX /star/etc/scb
The index files created in the SCB_INDEX directory should total around 5-10 Mb for the whole Starlink source code set. On some operating systems the index files may be sparse, and appear much bigger than they are, so that ls -l makes them look very large, while du or ls -s gives their true size. Copying the indexes should be done using the supplied utility scbcp (see section 6.2), not the Unix cp command; the latter would work, but might result in inefficient use of disk space.
SCB --- Source Code Browser