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