AFS_COMPILE_ET(1)

✨ AFS_COMPILE_ET ✨

okay so bestie, welcome to the afs_compile_et page from the AFS Command Reference β€” this is the little tool that makes your error tables, and yes it's giving very much "internal build machinery" energy, but we're gonna get through it together πŸ’–


🌸 NAME 🌸

afs_compile_et β€” produce error text tables for compilation. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

afs_compile_et [-debug] [-language <lang>]
    [-prefix <prefix>] [-v <version>]
    [-h <include>] <[-emit <output>]
    error_table>

πŸ’… DESCRIPTION πŸ’…

So like, the afs_compile_et command builds the error text tables for compilation. And when I say "builds," I mean it makes two whole things:

  • a header file, which holds a set of mappings between error names and values πŸ”₯
  • a .c file (or a .msf file, iykyk) that provides a text table of descriptions ✨

The <error_table> argument tells it which error table to generate. That error table specification needs to already be chillin' in the current working directory, or in the directory you named with -prefix, and it's gotta be named error_table.et. no cap.

Now here's the tea: by default, afs_compile_et generates two files in one invocation. And that is, lowkey, a problem for parallel build systems 😭. That's exactly why the -emit option exists β€” you can generate the output files independently, with two separate invocations of afs_compile_et for a given error table. Which means parallel build systems get to generate the source and header files, plus the targets that depend on the generated source and header files, all in parallel. iconic. πŸ‘‘


⚠️ CAUTIONS ⚠️

  • This command is used internally within the build process for OpenAFS. Most users will access this information via translate_et(1) rather than via afs_compile_et. 🫢
  • This command does not use the standard AFS command-line parsing package. it's built different. πŸ’€

πŸŽ€ OPTIONS πŸŽ€

  • -debug β€” Does absolutely nothing. It neither adds debugging information to the output, nor provides additional information on its operation. It's just... there. vibing. πŸ™ˆ
  • -language <lang> β€” Specifies the type of output to generate. Currently, only ANSI C and K&R are supported values β€” via the c and k&r-c values, respectively. The default is ANSI C. There is some support for C++ started, but that is not yet supported. (someday bestie, someday 🌈)

The -lang <lang> option is a synonym for -language <lang>.

  • -prefix <prefix> β€” Specifies the directory to search for the error_table.et file. Also specifies the directory to search for the prolog file when the -h option is given. The -p <prefix> option is a synonym for -prefix <prefix>. two names, one queen πŸ’œ
  • -h <include> β€” Specifies an input file, called a prolog file, and modifies the name of the header file generated by afs_compile_et.

When the -h option is given, afs_compile_et will search for a prolog file named <include>.p.h. It'll search the current working directory for the prolog file, unless the -p option is given. And if the prolog file is found, afs_compile_et will place a verbatim copy of the prolog file contents into the generated header file. copy-paste but make it intentional ✨

When the -h option is given, the name of the header file generated by afs_compile_et is <include>.h, instead of <error_table>.h.

The -h option does not affect the source file generated by afs_compile_et. the source file said "not my business" πŸ’…

  • -v <version> β€” Specifies the type of output file: valid values are 1 (the default, for C files) or 2, for .msf file generation.
  • -emit <output> β€” Specifies which program file to generate; the header file or the source file. Specify -emit header (or -emit h) to generate the .h header file. Specify -emit source (or -emit c) to generate the .c (or .msf) source file. pick your fighter πŸ₯Š

🌟 EXAMPLES 🌟

The following command generates the files pterror.h and pterror.c, suitable for use with C programs:

% afs_compile_et -p path/to/src/ptserver pterror

The following command generates K&R style files instead:

% afs_compile_et -p path/to/src/ptserver -lang 'k&r-c' pterror

The following command generates the pterror.h file, but not the pterror.c file.

% afs_compile_et -p path/to/src/ptserver -emit header pterror

The following command generates the pterror.c file, but not the pterror.h file.

% afs_compile_et -p path/to/src/ptserver -emit source pterror

πŸ‘€ SEE ALSO πŸ‘€

translate_et(1)

(go read that one, bestie, it's the user-facing glow-up 🌸)


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.


and that's the whole page!! πŸ’– this lil' doc shipped as part of OpenAFS, last touched 2026-07-27 β€” shoutout to Steven Jenkins for the write-up, and shoutout to you for making it all the way to the bottom. slay. go build something. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from