Add installing entab to pgindent instructions

And minor other pgindent documentation tweaks.
This commit is contained in:
Peter Eisentraut 2012-03-21 21:27:30 +02:00
parent 5b9c1e6d52
commit 621eb156f1

View File

@ -6,28 +6,34 @@ pgindent
This can format all PostgreSQL *.c and *.h files, but excludes *.y, and This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
*.l files. *.l files.
1) Install pg_bsd_indent (see below for details) 1) Install pg_bsd_indent (see below for details).
2) Change directory to the top of the build tree. 2) Install entab (src/tools/entab/).
3) Download the typedef file from the buildfarm: 3) Change directory to the top of the build tree.
4) Download the typedef file from the buildfarm:
wget -O src/tools/pgindent/typedefs.list http://buildfarm.postgresql.org/cgi-bin/typedefs.pl wget -O src/tools/pgindent/typedefs.list http://buildfarm.postgresql.org/cgi-bin/typedefs.pl
4) Remove all derived files (pgindent has trouble with one of the flex macros): 5) Remove all derived files (pgindent has trouble with one of the flex macros):
gmake maintainer-clean gmake maintainer-clean
5) Run pgindent: Or:
git clean -fdx
6) Run pgindent:
find . -name '*.[ch]' -type f -print | \ find . -name '*.[ch]' -type f -print | \
egrep -v -f src/tools/pgindent/exclude_file_patterns | \ egrep -v -f src/tools/pgindent/exclude_file_patterns | \
xargs -n100 src/tools/pgindent/pgindent src/tools/pgindent/typedefs.list xargs -n100 src/tools/pgindent/pgindent src/tools/pgindent/typedefs.list
6) Remove any files that generate errors and restore their original 7) Remove any files that generate errors and restore their original
versions. versions.
7) Do a full test build: 8) Do a full test build:
run configure run configure
# stop is only necessary if it's going to install in a location with an # stop is only necessary if it's going to install in a location with an
@ -37,7 +43,7 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
gmake -C contrib install gmake -C contrib install
gmake installcheck-world gmake installcheck-world
8) Indent the Perl MSVC code: 9) Indent the Perl MSVC code:
cd src/tools/msvc cd src/tools/msvc
perltidy -b -bl -nsfs -naws -l=100 -ole=unix *.pl *.pm perltidy -b -bl -nsfs -naws -l=100 -ole=unix *.pl *.pm
@ -47,7 +53,7 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
BSD indent BSD indent
---------- ----------
We have standardized on NetBSD's indent, and renamed it pg_bsd_indent. We have standardized on NetBSD's indent, and renamed it pg_bsd_indent.
We have fixed a few bugs which requre the NetBSD source to be patched We have fixed a few bugs which requre the NetBSD source to be patched
with indent.bsd.patch patch. A fully patched version is available at with indent.bsd.patch patch. A fully patched version is available at
ftp://ftp.postgresql.org/pub/dev. ftp://ftp.postgresql.org/pub/dev.