Author: Chu-Cheow Lim and Stephen Omohundro
Created: Mon Jun  3 15:09:31 1991
Copyright (C) International Computer Science Institute, 1991
Changes: Heinz Schmidt (hws@csis.dit.csiro.AU), Feb 23 1992
Copyright (C) CSIRO Division of Information Technology, 1992



This file describes the compiler command line options.  You need to
understand the following defaulting mechanism: The .sather file(s)
define options that override any defaults built-in to the compiler
source or burnt into the compiler at installation time.  .sather
options are overriden by command line options, if corresponding
options exist, see below.

-all: Generates C code for all Sather classes listed in the ".sather"
   file. Generates code even for routines which are never called and
   generates classes which are not used directly but are only inherited
   from. 

-cc <c compiler>: use the given C compiler. This defaults to "cc" and
   overrides by the .sather "(c_compiler)" option.

-cflags <flags>: pass the given flags into the compiler generated 
   make file. This overrides the .sather "(cc_flags)" option.

-chk: Cause the generated code to contain runtime checks for accesses
   out of array bounds, for attempts to access attributes of void
   objects, and to perform runtime type checking for reverse assignments.
   This catches the only three ways that a Sather program can core dump
   (assuming any included C code is correct). If one of these problems
   occurs the runtime system will print an error message describing the
   error and the source code location. It is often convenient to compile
   with this option during initial debugging of a program. It may be used
   independently of the "-sdb" option.

-com <filename>: Read the commands from <filename> instead of from
   ".sather" in the current working directory.

-dco: Generate C code but don't compile it.

-dir <directory-name>: Both the ".cs" subdirectory and compiled code will
   be installed in <directory-name> instead of the current directory.

-gen: Regenerate the automatically included basic library files
   instead of using stored object files.

-hom <directory>: This overrides the "(sather_home)" option of .sather.
   The default is the value of the environment variable `SATHER_HOME'
   or, if this variable is undefined, the pathname of the sather
   installation directory burnt into the compiler at installation time.
   This value is used in finding precompiled and other files. Also
   it is exported as the value of the environment variable `SATHER_HOME'
   that may be used in pathnames.

-info: Generate runtime class name information that is accessible
   from within programs through the "SYS" class. 

-mak <com>: cs will use the given make command to run the make file
   it generates. "pmake", for instance is a parallel make utility 
   from UC Berkeley (anon ftp from ginger.berkeley.edu) which distributes
   make steps across a network of workstations and can considerably
   speed up compiling a large system of classes. 
   User included make files (c_makefile option in .sather) are
   always run using "make".

-ncs: This asks the compiler to treat the current compilation as
   completely new.  If there is any problem in re-compilation
   (eg due to a bug), "-ncs" may clear the problem.

-pds: Print descendent information to be used in certain classes.

-sdb: Compile a version of a program with the information needed by
   sdb to do symbolic debugging.

-sys: "cs" reads a default .sather file from "sather/sys" for some of the
   predefined classes.  This is useful when we want to test new
   predefined classes or alternative runtimes while leaving the current
   runtime available to other users.  This option is not useful for
   general Sather programmers.

-ver: For people who would like to look at the Sather-generated
   C code, this provides more understandable code for accessing
   object attributes.

-voi: If the C compiler requires "void" declaration for C routines
   that do not return any value, then this will ask "cs" to generate
   declarations with "void" where necessary.

-w: Warnings only. The cs output will be less verbose. This flag
   is not passed on to the C compiler. Use the "(cc_flags)" in .sather
   or the -cflags option above.

(As a side note, classes `SYS', `UNIX' are predefined, but not read by
"cs" for every compilation.  The reason is that these classes require
the use of several other data structures which will increase the
number of files read by "cs".)



