CA(1)

ca - compile an Algol 68 module

SYNOPSIS
ca [-c] [-C c-flag] [-d m-files-dir] [-g] [-h | --help] [-I inc-dir] [-L link-dir] [-l link-lib] [-M lib-dir] [-m mod-lib] [-u uname] [-w web68-dir] module-path[.a68|.w68]

DESCRIPTION
ca will convert a source module written in Algol 68 or Web 68 into an object module. If it is a program, ca will link it to form a binary program in the directory specified by module-path . Otherwise, it will store the object module in a static library specified in a -m argument which should be preceded by a -M argument giving its directory. If the -M option is not used, the default directory for the static library file will be used (it is ~/lib . The module will include debugging symbols if the option -g is used. ca is intended to replace the module manager ‘mm’ usually supplied with the a68toc(1) translator, and the make(1) command. Note that generally the argument of an option should be separated from the option by a space.

ca will run tang(1) if the file extension is .w68 . If the filename has no extension, ‘.a68’ is presumed.

OPTIONS
The following options are available:-

-c  Remove run-time checks from the compiled program (not recommended).

-C  Specify a flag for the C compiler. This option may be repeated.

-d m-files-dir
    Add m-files-dir to the list of directories containing .m files produced by a68toc(1) for precompiled modules. The default value is

    /usr/share/algol68/
        .

    The last directory added will be searched first. This option may be repeated.

-g  Add debugging symbols to your program. Only the programs a68toc(1) and gcc(1) are affected by the -g flag.

-h | ---help
    Displays a terse help message together with the defaults of arguments.

-I inc-dir
    Add inc-dir to the list of directories which gcc(1) should be searched for included C files. The default value is

    -I /usr/include/algol68 -I /usr/include

    This option may be repeated.

-L link-dir
    Adds link-dir to the list of directories in which gcc(1) will search for libraries for linking. It should be followed by -l link-lib arguments indicating the libraries to be searched. The default is

    -L /usr/lib -L ${HOME}/lib

    This option may be repeated.

-l link-lib
    Adds link-lib to the list of libraries which gcc(1) will search for precompiled routines for linking. It should be preceded by a -L link-dir option giving the directory to search for the library unless it can be found in the list of libraries already defined (or by default). The following libraries are searched last in the linking process:-

    -la68s -la68 -lm -lc

    This option may be repeated.

-M lib-dir
    Specifies the directory which contains static libraries of pre-compiled modules. ca presumes that the.m file produced by a68toc(1) will be stored in the sub-directory m of lib-dir . Usually, these libraries will contain modules compiled by a68toc(1) . ca presumes that the .m file produced by a68toc(1) from a declarations module will be moved to the sub-directory ‘m’ in the directory specified by this parameter. The default -M directory is ~/lib . The argument should not be repeated.

-m mod-lib
    Specifies a static library of pre-compiled modules. When compiling a DECS module, if the library does not exist, it will be created. Both the lib in the name and the suffix of .a may be omitted.

-u uname
    Specifies the uname command for a68toc(1). The default is ‘seedfile’. See a68toc(1) for further details.

-w web68-dir
    Specifies a directory to be added to the list of directories in which tang(1) should look for Web 68 include files. The default value is

    ${HOME}/lib
    The option can be repeated.

FILES
None.

ENVIRONMENT
None.

EXAMPLES

ca prog
    This command will translate the source prog.a68 into C, compile it with gcc(1) and then link it to produce the executable prog in the current directory. The object file prog.o will be linked with the standard Algol 68 libraries.

ca -d ~/lib/m -l forms -w . prog.w68
    This command will run tang(1), then a68toc(1), then gcc(1) and will then link the resulting prog.o file with the Xforms libraries. Included Web 68 files will be searched for in the current working directory and directory ~/lib . The directory ~/lib/m will be searched for .m files of precompiled modules.

ca -d . -M ~/lib -m mod decs.a68
    The declaration module decs.a68 will be translated to C, compiled to object form and then stored in libmod.a in directory ~/lib . The.m file will be stored in ~/lib/m .m files from precompiled modules will be looked for in the current working directory.

SEE ALSO
a68toc(1) gcc(1) tang(1)

COPYRIGHT
Copyright (C) 2012 Sian Mountbatten and available under the GNU Public Licence version 2 or any later version.

AUTHOR
Sian Mountbatten