postgresql/src/tools/pg_bsd_indent/README.pg_bsd_indent

31 lines
1.1 KiB
Plaintext

pg_bsd_indent
This is a lightly modified version of the "indent" program maintained
by the FreeBSD project. The modifications are mostly to make it portable
to non-BSD-ish platforms, though we do have one formatting switch we
couldn't convince upstream to take.
To build it, you will need a Postgres installation, version 9.5 or newer.
(Once built, the program doesn't depend on that installation.)
To build, just say "make"; or if pg_config from your Postgres installation
isn't in your PATH, say
make PG_CONFIG=path/to/pg_config
Optionally, run "make test" for some simple sanity checks.
To install, copy pg_bsd_indent to somewhere in your usual PATH.
(If you say "make install", it will try to put it in your Postgres
installation directory, which is most likely not what you want for
long-term use.)
TODO: add build support and instructions for Windows
If you happen to be hacking upon the indent source code, the closest
approximation to the existing indentation style seems to be
./pg_bsd_indent -i4 -l79 -di12 -nfc1 -nlp -sac somefile.c
although this has by no means been rigorously adhered to.
(What was that saw about the shoemaker's children?)