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