6 This can format all PostgreSQL *.c and *.h files, but excludes *.y, and *.l
11 1) Build the source tree with _debug_ symbols and all possible configure options
13 2) Install to /usr/local/pgsql
15 3) Install all contrib modules
17 4) Save a list of typedefs by running:
19 src/tools/find_typedef /usr/local/pgsql/bin /usr/local/pgsql/lib > /tmp/pgtypedefs
21 5) Run 'gmake distclean' from the top of the source tree to remove any
24 6) From the top of the source tree, run:
26 find . -name '*.[ch]' -type f -print |
27 egrep -v '/s_lock.h|/ecpg/test/expected/|/snowball/libstemmer/' |
28 xargs -n100 pgindent /tmp/pgtypedefs
30 ---------------------------------------------------------------------------
32 We have standardized on NetBSD's indent. We have fixed a few bugs which
33 requre the NetBSD source to be patched with indent.bsd.patch patch. A
34 fully patched version is available at ftp://ftp.postgresql.org/pub/dev.
36 GNU indent, version 2.2.6, has several problems, and is not recommended.
37 These bugs become pretty major when you are doing >500k lines of code.
38 If you don't believe me, take a directory and make a copy. Run pgindent
39 on the copy using GNU indent, and do a diff -r. You will see what I
40 mean. GNU indent does some things better, but mangles too.
42 Notes about excluded files:
44 src/include/storage/s_lock.h is excluded because it contains assembly code
45 that pgindent tends to mess up.
47 src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
50 src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/
51 are excluded because those files are imported from an external project,
52 not maintained locally, and are machine-generated anyway.