Next Previous Contents

10. Command line parameters

AMC parses command line parameters using typical POSIX.1 conventions. This means that as parameters are retrieved from the operating system, options are specified with flag characters.

If you type amc -h on the command line, AMC will print out a quick summary of its command line options.

  % amc -h

  amc - Module Translator Vx.yy [Dec 9 1998] on Linux 
  Copyright (C) 1997-1999 Mark Grosberg.

  Usage:
        amc [-bhkqiw] [-r root] [-license] project_file <project options>

  Where:
        -b         Build all modules regardless of target date
        -h         Display this help message
        -k         Keep files that fail compilation
        -r mod     Just compile module "mod" in default location
        -r loc:mod Compile module "mod" in location "loc"
        -i         Go into interactive mode.
        -q         Quiet. Do not display copyright info
        -w         Disable word wrapping of errors
        -license   Display license and copying info

  'project_file' must refer to the file name containing a project
  description file which describes the location, compilation, and
  starting module information.
The first argument that is not preceeded by the argument separator character (a - on POSIX.1) is presumed to be the project file. AMC requires a project file to do anything. It defines basic operating parameters that are necessary even for interactive mode. If AMC can not find the project file, or the project file has errors, no action is taken.

The remaining command line arguments may be used in the project file any way that is desired. Any place a string is required an argument following the project file may be used. For example:


 set CC=@[0]

Will require that an argument follows the project file. That argument, will be used to set the environment variable CC. This feature is useful when running AMC from scripts for large software that is produced automatically without human intervention.


Next Previous Contents