@@ -3,7 +3,9 @@ include Makefile.common.mk
33
44RELEASE_SQL = $(EXTENSION ) --$(PGSPHERE_VERSION ) .sql
55USE_PGXS = 1
6- USE_HEALPIX =? 1
6+ USE_HEALPIX ?= 1
7+ PGINDENT ?= pgindent
8+ PGBSDINDENT ?= pg_bsd_indent
79
810# the base dir name may be changed depending on git clone command
911SRC_DIR = $(shell basename $(shell pwd) )
@@ -223,3 +225,27 @@ endif
223225dist : clean sparse.c sscan.c
224226 find . -name ' *~' -type f -exec rm {} \;
225227 cd .. && tar --transform s/$(SRC_DIR ) /pgsphere-$(PGSPHERE_VERSION ) / --exclude CVS --exclude .git -czf pgsphere-$(PGSPHERE_VERSION ) .tar.gz $(SRC_DIR ) && cd -
228+
229+ # To launch pgindent, set the PATH environment variable to the directories
230+ # containing the binaries pgindent and pg_bsd_indent. It is important to
231+ # utilize a specific version of pg_bsd_indent, which sources can be found
232+ # in the postgresql>/src/tools/pg_bsd_indent directory, where <postgresql>
233+ # is the root directory of the postgresql project source tree.
234+ #
235+ # The sources of the utilities can be found in the following directories:
236+ # - <postgresql>/src/tools/pgindent
237+ # - <postgresql>/src/tools/pg_bsd_indent
238+ #
239+ # pgindent-typedefs.list should be updated every time after implementing
240+ # new types and introducing new typedefs in the code. For details how
241+ # to update pgindent-typedefs.list and for other information about pgindent,
242+ # please, read the doc: <postgresql>/src/tools/pgindent/README.
243+ #
244+ # pgindent-excludes.list is used to specify files to be ignored.
245+ #
246+ pgindent :
247+ $(PGINDENT ) \
248+ --typedefs=pgindent-typedefs.list \
249+ --excludes=pgindent-excludes.list \
250+ --indent=${PGBSDINDENT} \
251+ src
0 commit comments