backport to buster
[hcoop/debian/openafs.git] / doc / man-pages / pod1 / afs_compile_et.pod
CommitLineData
805e021f
CE
1=head1 NAME
2
3afs_compile_et - Produce error text tables for compilation
4
5=head1 SYNOPSIS
6
7=for html
8<div class="synopsis">
9
10B<afs_compile_et> [B<-debug>] S<<< [B<-language> <I<lang>>] >>>
11 S<<< [B<-prefix> <I<prefix>>] >>> S<<< [B<-v> <I<version>>] >>>
12 S<<< [B<-h> <I<include>>] >>> <S<<< [B<-emit> <I<output>>] >>>
13 I<error_table>>
14
15=for html
16</div>
17
18=head1 DESCRIPTION
19
20The B<afs_compile_et> command builds the error text tables for compilation.
21This includes both a header file that contains a set of mappings between
22error names and values and a F<.c> (or F<.msf>) file that provides a text
23table of descriptions.
24
25The <I<error_table>> argument specifies which error table to generate.
26The error table specification should exist in the current working
27directory or in the directory specified with B<-prefix> and should be
28named F<error_table.et>.
29
30By default, B<afs_compile_et> generates two files in one invocation. This is
31problematic for parallel build systems. The B<-emit> option may be used to
32generate the output files independently with two separate invocations of
33B<afs_compile_et> for a given error table. This allows parallel build systems
34to generate the source and header files, and the targets which depend on the
35generated source and headers files, in parallel.
36
37=head1 CAUTIONS
38
39This command is used internally within the build process for OpenAFS.
40Most users will access this information via L<translate_et(1)> rather than
41via B<afs_compile_et>.
42
43This command does not use the standard AFS command-line parsing package.
44
45=head1 OPTIONS
46
47=over 4
48
49=item B<-debug>
50
51Does nothing. It neither adds debugging information to the output nor
52provides additional information on its operation.
53
54=item B<-language> <I<lang>>
55
56Specifies the type of output to generate. Currently, only ANSI C and K&R
57are supported values (via the B<c> and B<k&r-c> values, respectively).
58The default is ANSI C. There is some support for C++ started, but that is
59not yet supported.
60
61The B<-lang> <I<lang>> option is a synonym for B<-language> <I<lang>>>.
62
63=item B<-prefix> <I<prefix>>
64
65Specifies the directory to search for the F<error_table.et> file. Specifies
66the directory to search for the prolog file when the B<-h> option is
67given. The B<-p> <I<prefix>> option is a synonym for B<-prefix> <I<prefix>>.
68
69=item B<-h> <I<include>>
70
71Specifies an input file, called a prolog file, and modifies the name of the
72header file generated by B<afs_compile_et>.
73
74When the B<-h> option is given, B<afs_compile_et> will search for a prolog file
75named <I<include>>F<.p.h>. B<afs_compile_et> will search the current working
76directory for the prolog file, unless the B<-p> option is given. If the prolog
77file is found, B<afs_compile_et> will place a verbatim copy of the prolog
78file contents into the generated header file.
79
80When the B<-h> option is given, the name of the header file generated by
81B<afs_compile_et> is <I<include>>F<.h>, instead of <I<error_table>>F<.h>.
82
83The B<-h> option does not affect the source file generated by B<afs_compile_et>.
84
85=item B<-v> <I<version>>
86
87Specified the type of output file: valid values are 1 (the default, for C
88files) or 2, for B<.msf> file generation.
89
90=item B<-emit> <I<output>>
91
92Specifies which program file to generate; the header file or the source file.
93Specify B<-emit header> (or B<-emit h>) to generate the F<.h> header file.
94Specify B<-emit source> (or B<-emit c>) to generate the F<.c> (or F<.msf>)
95source file.
96
97=back
98
99=head1 EXAMPLES
100
101The following command generates the files F<pterror.h> and F<pterror.c>,
102suitable for use with C programs:
103
104 % afs_compile_et -p path/to/src/ptserver pterror
105
106The following command generates K&R style files instead:
107
108 % afs_compile_et -p path/to/src/ptserver -lang 'k&r-c' pterror
109
110The following command generates the F<pterror.h> file, but not the F<pterror.c>
111file.
112
113 % afs_compile_et -p path/to/src/ptserver -emit header pterror
114
115The following command generates the F<pterror.c> file, but not the F<pterror.h>
116file.
117
118 % afs_compile_et -p path/to/src/ptserver -emit source pterror
119
120=head1 SEE ALSO
121
122L<translate_et(1)>
123
124=head1 COPYRIGHT
125
126Copyright 2009 Steven Jenkins <steven@endpoint.com>
127
128This documentation is covered by the IBM Public License Version 1.0. This
129man page was written by Steven Jenkins for OpenAFS.