2009-05-18 20:28:05 +01:00
|
|
|
=head1 NAME
|
|
|
|
|
2009-07-22 01:11:15 +01:00
|
|
|
afs_compile_et - Produce error text tables for compilation
|
2009-05-18 20:28:05 +01:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
=for html
|
|
|
|
<div class="synopsis">
|
|
|
|
|
2009-07-22 01:11:15 +01:00
|
|
|
B<afs_compile_et> [B<-debug>] S<<< [B<-language> <I<lang>>] >>>
|
2014-01-20 19:37:52 +00:00
|
|
|
S<<< [B<-prefix> <I<prefix>>] >>> S<<< [B<-v> <I<version>>] >>>
|
2012-08-01 22:26:33 +01:00
|
|
|
S<<< [B<-h> <I<include>>] >>> <S<<< [B<-emit> <I<output>>] >>>
|
|
|
|
I<error_table>>
|
2009-05-18 20:28:05 +01:00
|
|
|
|
|
|
|
=for html
|
|
|
|
</div>
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2009-07-22 01:11:15 +01:00
|
|
|
The B<afs_compile_et> command builds the error text tables for compilation.
|
2009-05-18 20:28:05 +01:00
|
|
|
This includes both a header file that contains a set of mappings between
|
|
|
|
error names and values and a F<.c> (or F<.msf>) file that provides a text
|
|
|
|
table of descriptions.
|
|
|
|
|
|
|
|
The <I<error_table>> argument specifies which error table to generate.
|
|
|
|
The error table specification should exist in the current working
|
|
|
|
directory or in the directory specified with B<-prefix> and should be
|
|
|
|
named F<error_table.et>.
|
|
|
|
|
2012-08-01 22:26:33 +01:00
|
|
|
By default, B<afs_compile_et> generates two files in one invocation. This is
|
|
|
|
problematic for parallel build systems. The B<-emit> option may be used to
|
|
|
|
generate the output files independently with two separate invocations of
|
|
|
|
B<afs_compile_et> for a given error table. This allows parallel build systems
|
|
|
|
to generate the source and header files, and the targets which depend on the
|
|
|
|
generated source and headers files, in parallel.
|
|
|
|
|
2009-05-18 20:28:05 +01:00
|
|
|
=head1 CAUTIONS
|
|
|
|
|
|
|
|
This command is used internally within the build process for OpenAFS.
|
|
|
|
Most users will access this information via L<translate_et(1)> rather than
|
2009-07-22 01:11:15 +01:00
|
|
|
via B<afs_compile_et>.
|
2009-05-18 20:28:05 +01:00
|
|
|
|
|
|
|
This command does not use the standard AFS command-line parsing package.
|
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<-debug>
|
|
|
|
|
|
|
|
Does nothing. It neither adds debugging information to the output nor
|
|
|
|
provides additional information on its operation.
|
|
|
|
|
|
|
|
=item B<-language> <I<lang>>
|
|
|
|
|
|
|
|
Specifies the type of output to generate. Currently, only ANSI C and K&R
|
|
|
|
are supported values (via the B<c> and B<k&r-c> values, respectively).
|
|
|
|
The default is ANSI C. There is some support for C++ started, but that is
|
|
|
|
not yet supported.
|
|
|
|
|
2014-01-21 14:39:56 +00:00
|
|
|
The B<-lang> <I<lang>> option is a synonym for B<-language> <I<lang>>>.
|
|
|
|
|
2014-01-21 14:36:37 +00:00
|
|
|
=item B<-prefix> <I<prefix>>
|
2009-05-18 20:28:05 +01:00
|
|
|
|
2014-01-20 19:37:52 +00:00
|
|
|
Specifies the directory to search for the F<error_table.et> file. Specifies
|
|
|
|
the directory to search for the prolog file when the B<-h> option is
|
|
|
|
given. The B<-p> <I<prefix>> option is a synonym for B<-prefix> <I<prefix>>.
|
|
|
|
|
|
|
|
=item B<-h> <I<include>>
|
|
|
|
|
|
|
|
Specifies an input file, called a prolog file, and modifies the name of the
|
|
|
|
header file generated by B<afs_compile_et>.
|
|
|
|
|
|
|
|
When the B<-h> option is given, B<afs_compile_et> will search for a prolog file
|
|
|
|
named <I<include>>F<.p.h>. B<afs_compile_et> will search the current working
|
|
|
|
directory for the prolog file, unless the B<-p> option is given. If the prolog
|
|
|
|
file is found, B<afs_compile_et> will place a verbatim copy of the prolog
|
|
|
|
file contents into the generated header file.
|
|
|
|
|
|
|
|
When the B<-h> option is given, the name of the header file generated by
|
|
|
|
B<afs_compile_et> is <I<include>>F<.h>, instead of <I<error_table>>F<.h>.
|
|
|
|
|
|
|
|
The B<-h> option does not affect the source file generated by B<afs_compile_et>.
|
2009-05-18 20:28:05 +01:00
|
|
|
|
|
|
|
=item B<-v> <I<version>>
|
|
|
|
|
|
|
|
Specified the type of output file: valid values are 1 (the default, for C
|
|
|
|
files) or 2, for B<.msf> file generation.
|
|
|
|
|
2012-08-01 22:26:33 +01:00
|
|
|
=item B<-emit> <I<output>>
|
|
|
|
|
|
|
|
Specifies which program file to generate; the header file or the source file.
|
|
|
|
Specify B<-emit header> (or B<-emit h>) to generate the F<.h> header file.
|
|
|
|
Specify B<-emit source> (or B<-emit c>) to generate the F<.c> (or F<.msf>)
|
|
|
|
source file.
|
|
|
|
|
2009-05-18 20:28:05 +01:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 EXAMPLES
|
|
|
|
|
2014-01-21 14:36:37 +00:00
|
|
|
The following command generates the files F<pterror.h> and F<pterror.c>,
|
2009-05-18 20:28:05 +01:00
|
|
|
suitable for use with C programs:
|
|
|
|
|
2009-07-22 01:11:15 +01:00
|
|
|
% afs_compile_et -p path/to/src/ptserver pterror
|
2009-05-18 20:28:05 +01:00
|
|
|
|
|
|
|
The following command generates K&R style files instead:
|
|
|
|
|
2009-07-22 01:11:15 +01:00
|
|
|
% afs_compile_et -p path/to/src/ptserver -lang 'k&r-c' pterror
|
2009-05-18 20:28:05 +01:00
|
|
|
|
2012-08-01 22:26:33 +01:00
|
|
|
The following command generates the F<pterror.h> file, but not the F<pterror.c>
|
|
|
|
file.
|
|
|
|
|
|
|
|
% afs_compile_et -p path/to/src/ptserver -emit header pterror
|
|
|
|
|
|
|
|
The following command generates the F<pterror.c> file, but not the F<pterror.h>
|
|
|
|
file.
|
|
|
|
|
|
|
|
% afs_compile_et -p path/to/src/ptserver -emit source pterror
|
|
|
|
|
2009-05-18 20:28:05 +01:00
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<translate_et(1)>
|
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
Copyright 2009 Steven Jenkins <steven@endpoint.com>
|
|
|
|
|
|
|
|
This documentation is covered by the IBM Public License Version 1.0. This
|
|
|
|
man page was written by Steven Jenkins for OpenAFS.
|