Man Page sbinit.4




NAME

     sbinit - directives to SourceBrowser and compilers


SYNOPSIS

     sbinit


AVAILABILITY

     Available with ANSI C, C++, Sun FORTRAN, and Assembler.


DESCRIPTION

     .sb_init is a text file used by the compilers and  sbtags(1)
     to  obtain  control  information  about  the Source Browsing
     database structure. As a default, the database is  built  in
     the  current  working  directory  and searches that database
     when you issue a query. Use .sb_init if  you  want  to  work
     with  source  files  whose database information is stored in
     multiple directories.

     The .sb_init file should be placed by default in the  direc-
     tory  SunWS_config  under  cwd. The default directory can be
     changed  by  the  environment  variable  SUNWWS_CONFIG_NAME.
     sbtags(1) are run.


USAGE

     The .sb_init file is limited to the  commands  described  in
     this section.

  COMMANDS
     import
          This command allows the command-line source browser  to
          read  databases  in  directories other than the current
          working directory. The import command has the form

          import path

          where path is the path to the directory containing  the
          subdirectory  where  the database you want to import is
          stored.

     export
          This command causes  the  compilers  and  sbtags(1)  to
          write  database  component files associated with speci-
          fied source files to directories other than the current
          working  directory  used by the Source Browsing mode of
          WorkShop and the compiler. The export command  has  the
          form

          export prefix into path

          Whenever the compiler processes  a  source  file  whose
          absolute  path  starts with prefix the resulting Source
          Browsing data ( .bd) file is stored in the database  in
          path.  The  export  command  contains an implied import
          command of path, so that exported  database  components
          are  automatically  read by the Source Browsing mode of
          WorkShop.

     replacepath
          This command specifies how to modify path names in  the
          Source  Browsing database.  The replacepath command has
          the form

          replacepath from-prefix to-prefix

          where from-prefix is  the  prefix  path  that  will  be
          replaced by to-prefix whenever found.

          In general, from-prefix corresponds to the automounter;
          mount_point the pathname where the automounter actually
          mounts the filesystem; and the to-prefix is  the  auto-
          mounter  trigger_point  (the pathname known and used by
          the developer).  Note that there is considerable flexi-
          bility  in how an automounter is used and can vary from
          host to host.  Path replacement rules  are  matched  in
          the  order that they are found and matching stops after
          a replacement is done.

     automount-prefix
          This command is identical to  the  replacepath  command
          except that automount-prefix path translations occur at
          compile time and are written into  the  database.   The
          path translations from both commands are used to search
          for source files while browsing, if  the  path  in  the
          database fails.

          There is a default automount-prefix  command  which  is
          used to strip away automounter artifacts:

          automount-prefix /tmp_mnt /

          This rule is  generated  only  if  no  automount-prefix
          rules  are entered. (The manual incorrectly states that
          /tmp_mnt /net is the default rule.)

     cleanup-delay
          This command limits the time elapsed between rebuilding
          the  index  and  the associated .bd garbage collection.
          The compilers automatically invoke sbcleanup(1) if  the
          limit is exceeded.  The default value is 12 hours.






EXAMPLE

     import /project/source2

     export /usr/include into /project/sys

     replacepath /van /gogh


SEE ALSO

     sbcleanup(1), sbquery(1), sbtags(1).