PROGRAM = pg_bsd_indent
OBJS = args.o err.o indent.o io.o lexi.o parse.o pr_comment.o $(WIN32RES)
-# clean junk left behind by "make check"
+# clean junk left behind by "make test"
EXTRA_CLEAN = *.out *.list tests.diff
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
-check: $(PROGRAM)
+# pgxs.mk assumes too much about what "make check" means, so call it "test"
+.PHONY: test
+
+test: $(PROGRAM)
@rm -f tests.diff
@cp $(srcdir)/tests/*.list .
@for testsrc in $(srcdir)/tests/*.0; do \
done
@cat tests.diff
@test '!' -s tests.diff
+ @echo Tests complete.
To build, just say "make"; or if pg_config from your Postgres installation
isn't in your PATH, say
make PG_CONFIG=path/to/pg_config
-Optionally, run "make check" for some simple sanity checks.
+Optionally, run "make test" for some simple sanity checks.
To install, copy pg_bsd_indent to somewhere in your usual PATH.
(If you say "make install", it will try to put it in your Postgres
long-term use.)
TODO: add build support and instructions for Windows
+
+
+If you happen to be hacking upon the indent source code, the closest
+approximation to the existing indentation style seems to be
+
+ ./pg_bsd_indent -i4 -l79 -di12 -nfc1 -nlp -sac somefile.c
+
+although this has by no means been rigorously adhered to.
+(What was that saw about the shoemaker's children?)