.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "BEAR" "1" "May 10, 2019" "Bear User Manuals" "" .hy .SH NAME .PP Bear - Build EAR .SH SYNOPSIS .PP bear [\f[I]options\f[R]] -- [\f[I]build command\f[R]] .SH DESCRIPTION .PP Bear is a tool to generate compilation database for clang tooling. .PP The JSON compilation database is used in Clang project to provide information how a single compilation unit was processed. When that is available then it is easy to re-run the compilation with different programs. .PP Bear executes the original build command and intercept the command executions issued by the build tool. From the log of command executions it tries to identify the compiler calls and creates the final compilation database. .SH OPTIONS .TP --version Print version number. .TP --help Print help message. .TP --verbose Enable verbose logging. .TP --output \f[I]file\f[R] Specify output file. (Default file name provided.) The output is a JSON compilation database. .TP --append Use previously generated output file and append the new entries to it. This way you can run Bear continuously during work, and it keeps the compilation database up to date. File deletion and addition are both considered. But build process change (compiler flags change) might cause duplicate entries. .TP --config \f[I]file\f[R] Specify a configuration file. The configuration file captures how the output should be formatted and which entries it shall contain. .TP --force-preload Force to use the dynamic linker method of \f[C]intercept\f[R] command. .TP --force-wrapper Force to use the compiler wrapper method of \f[C]intercept\f[R] command. .SH OUTPUT .PP The JSON compilation database definition changed over time. The current version of Bear generates entries where: .TP \f[B]\f[CB]directory\f[B]\f[R] has absolute path. .TP \f[B]\f[CB]file\f[B]\f[R] has absolute path. .TP \f[B]\f[CB]output\f[B]\f[R] has absolute path. .TP \f[B]\f[CB]arguments\f[B]\f[R] used instead of \f[C]command\f[R] to avoid shell escaping problems. (Configuration can force to emit the \f[C]command\f[R] field.) The compiler as the first argument has absolute path. Some non compilation related flags are filtered out from the final output. .SH CONFIG FILE .PP Read \f[C]citnames\f[R] man page for the content of this file. \f[C]bear\f[R] is not reading the content of this file, but passing the file name to \f[C]citnames\f[R]. .SH EXIT STATUS .PP The exit status of the program is the exit status of the build command. Except when the program itself crashes, then it sets to non zero. .SH SEE ALSO .PP intercept(1), citnames(1) .SH COPYRIGHT .PP Copyright (C) 2012-2021 by L\['a]szl\['o] Nagy .SH AUTHORS L\['a]szl\['o] Nagy.