Name

tspec — An API specification tool

Synopsis

tspec 

[ -Odir ] [ -f | -n ]
[ -b ] [ -p ] [ -r ] [ -u ] [ -v ]
[ -Idir ] [ -a | -s ] {  -l file | api [ header [ subset ]  ]    }

tspec 

{ -c | -e | -i | -m }
[ -p ] [ -r ] [ -u ] [ -v ]
[ -Idir ] [ -a | -s ] {  -l  file  | api [ header [ subset ]  ]    }

tspec 

{ -y }
[ -b ] [ -r ] [ -v ]
[ -Idir ] [ -a | -s ] {  -l  file  | api [ header [ subset ]  ]    }

tspec 

{ -V }

Description

tspec is a tool for translating a form of API (Application Programing Interface) description into the #pragma headers used by tcc to represent such APIs. It is more fully documented in tspec - An API Specification Tool.

There are two basic forms of stating what to process. The first specifies that tspec should process the whole of the API description api, or just one header from it, header, or just a subset of that header, subset, writing its output to the standard output directory. In addition, tspec has a local input mode (using the -l option) for translating single headers which are not part of an API into the corresponding #pragma token statements, writing the output to the standard output.

Options

-Idir

Add the colon-separated list of directories dir to the list of directories searched for input files. Input directories can also be specified using the TSPEC_INPUT environment variable.

-Odir

Specifies that the directory dir should be used as a base for the include output generated files. This can also be specified using the TSPEC_OUTPUT environment variable.

-V

Causes tspec to print the program's version, as well as the TenDRA release.

-b

Apply basename to API paths. This has the effect of flattening APIs within subdirectories into a single directory on output.

-a

Causes tspec to check all headers in an API at once, as opposed to separately (as with the -s option).

-c

Causes tspec to only check the input files, not to generate any output files.

-e

Causes tspec to only run its preprocessor phase, writing the output to the standard output.

-f

Causes tspec to ignore date stamps when deciding whether it is necessary to update an output file, and to force it to be updated.

-i

Causes tspec to print an index of all the objects specified in the input files to the standard output. This index is designed to be used as a quick guide to the contents of an API.

-l

Specifies local input mode (see above).

-m

Causes tspec to print an index intended for machine processing of all the objects specified in the input files to the standard output. This index is suitable for processing with text processing tools such as awk(1).

-n

Causes tspec to update any output files which are younger than the tspec executable. This is useful primarily in development work on tspec itself.

-p

Indicates to tspec that its input has already been preprocessed (i.e. that it is the output of a previous -e option).

-r

Causes tspec to only produce output for implemented, as opposed to used, objects.

-s

Causes tspec to check each header in an API separately, as opposed to all at once (as with the -a option).

-u

Causes tspec to generate unique token names for the objects in its input files.

-v

Causes tspec to enter verbose mode, in which it reports on the output files it creates. If two -v options are given then tspec enters very verbose mode, in which it gives more information on its activities.

-y

Causes tspec to generate tcc environment files. These contain the relevant configuration for tcc to use an API.

See Also

tcc, tdfc2.

tspec - An API Specification Tool.