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