Importing pg_bsd_indent into our source tree

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2023-02-09T18:30:30Z
Lists: pgsql-hackers

Attachments

As per the discussion at [1], here's a patchset to integrate
pg_bsd_indent into our main source tree, so that people don't
have to pull down a separate repo to get this tool.

0001 is a verbatim import of the current pg_bsd_indent repo contents.
I felt committing this separately is useful for traceability.

0002 adjusts the copyright notices to 3-clause BSD style,
so that we don't get complaints about our tree containing
copyrights inconsistent with the main Postgres license.

0003 is the first non-boring bit: it updates the Makefile
and some other things to account for now being an in-tree
build not out-of-tree.  Also, since 0002 already meant that
the README isn't exactly like upstream's, I got rid of the
separate README.pg_bsd_indent file and merged that info
into README.

0004 is the patch discussed at [2] to improve pgindent's
handling of multiline variable initializations.

0003 lacks meson support (anyone want to help with that?)
but otherwise these seem committable to me.  I'd anticipate
pushing 0001-0003 shortly but holding 0004 until we are ready
to do the post-March-CF pgindent run.  (Come to think of it,
0004 had probably better include a pg_bsd_indent version
bump too.)

			regards, tom lane

[1] https://www.postgresql.org/message-id/20230123001518.6hxyiczhn4kadvmf%40awork3.anarazel.de
[2] https://www.postgresql.org/message-id/flat/20230120013137.7ky7nl4e4zjorrfa%40awork3.anarazel.de

Commits

  1. Integrate pg_bsd_indent into our build/test infrastructure.

  2. Sync pg_bsd_indent's copyright notices with Postgres practice.

  3. Import pg_bsd_indent sources.