|
| 1 | +src/tools/pg_bsd_indent/README |
| 2 | + |
| 3 | +This is a lightly modified version of the "indent" program maintained |
| 4 | +by the FreeBSD project. The modifications are mostly to make it portable |
| 5 | +to non-BSD-ish platforms, though we do have one formatting switch we |
| 6 | +couldn't convince upstream to take. |
| 7 | + |
| 8 | +To build it, configure the surrounding Postgres source tree, |
| 9 | +then run "make" in this directory. |
| 10 | +Optionally, run "make test" for some simple tests. |
| 11 | + |
| 12 | +You'll need to install pg_bsd_indent somewhere in your PATH before |
| 13 | +using it. Most likely, if you're a developer, you don't want to |
| 14 | +put it in the same place as where the surrounding Postgres build |
| 15 | +gets installed. Therefore, do this part with something like |
| 16 | + |
| 17 | + make install prefix=/usr/local |
| 18 | + |
| 19 | +If you are using Meson to build, the standard build targets will |
| 20 | +build pg_bsd_indent and also test it, but there is not currently |
| 21 | +provision for installing it anywhere. Manually copy the built |
| 22 | +executable from build/src/tools/pg_bsd_indent/pg_bsd_indent to |
| 23 | +wherever you want to put it. |
| 24 | + |
| 25 | + |
| 26 | +If you happen to be hacking upon the indent source code, the closest |
| 27 | +approximation to the existing indentation style seems to be |
| 28 | + |
| 29 | + ./pg_bsd_indent -i4 -l79 -di12 -nfc1 -nlp -sac somefile.c |
| 30 | + |
| 31 | +although this has by no means been rigorously adhered to. |
| 32 | +(What was that saw about the shoemaker's children?) |
| 33 | +We're not planning to re-indent to Postgres style, because that |
| 34 | +would make it difficult to compare to the FreeBSD sources. |
| 35 | + |
| 36 | +---------- |
| 37 | + |
1 | 38 | The FreeBSD originals of the files in this directory bear the
|
2 | 39 | "4-clause" version of the BSD license. We have removed the
|
3 | 40 | "advertising" clauses, as per UC Berkeley's directive here:
|
|
0 commit comments