Use "make test" not "make check" to run test cases.
authorTom Lane <[email protected]>
Sat, 18 May 2019 21:34:13 +0000 (17:34 -0400)
committerTom Lane <[email protected]>
Sat, 18 May 2019 21:34:13 +0000 (17:34 -0400)
The "check" rules brought in by pgxs.mk conflict with this, and
produce annoying warnings, so just change the target name.

Makefile
README.pg_bsd_indent

index 8c5ff6e5b157f1e93bc9256917f3071a4632d5df..ee046f36f02cadcbfc8a90b0824dc4efeeb0522d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,14 +12,17 @@ PGAPPICON = win32
 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 \
@@ -29,3 +32,4 @@ check: $(PROGRAM)
        done
        @cat tests.diff
        @test '!' -s tests.diff
+       @echo Tests complete.
index 747130d03c66b57f85c75a16a646bee3729fb02b..85c3dcac1c5b131202fbe412cb3f2747e2f40668 100644 (file)
@@ -11,7 +11,7 @@ To build it, you will need a Postgres installation, version 9.5 or newer.
 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
@@ -19,3 +19,12 @@ installation directory, which is most likely not what you want for
 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?)