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.
-b
This option instructs AMC to remove any pre-built components before compiling. Normally, AMC will not build a module if it does not need to be built. However, there are many cases where you do want to build each and every module.
-h
This simply displays the help message and teminates AMC. AMC terminates immediatly after displaying the help screen.
-k
As a preprocessor, AMC actually generates output files that must be processed by a ``back end'' before the final output is produced. Normally, AMC destroys the output files it generates after passing the output to the back end compiler. However, should you want to see the output or debug a CGL program, this option prevents AMC from deleting these intermediate files.
-r
This option allows you to override the module that AMC starts compiling.
Normally, this is specified with the root statement in the
project file. But for large projects, you may only wish to see if a
module you have changed compiles. When specifying this option, AMC
will only dependency check the specified module (and any modules it
uses). If there is no : character, the module is assumed to
be in the default location. Otherwise, the location is to the left of
the : character and the module name to the right.
-i
For many reasons, AMC provides an internal ``shell'' that allows the user to specify commands interactively. One reason is that the parsing of the project files is not an efficient operation (and can take some time on slower computers). Another reason is that some operating systems make it rather difficult to launch a program.
-q
This option prevents the printing of the copyright information. This is provided because some editors/environments can automatically launch a compiler and put the results in a window. These editors go so far as to try and parse error messages and move the cursor to the offending line automatically. The copyright information that is printed at the startup of AMC may confuse these editors. Therefore, when programming your editor to launch AMC automatically, this option should be included.
-w
Normally, AMC attempts to figure out the width of the terminal you are using and word-wrap the error messages so that they look nice. If this is causing problems or for some reason you want to have lines exceed the bounds of your terminal, then use this option.
-license
This option displays some text on the legal aspects of AMC. Much like the help option, AMC terminates immediatly after displaying the text.
- 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]
CC.
This feature is useful when running AMC from scripts for large software
that is produced automatically without human intervention.