From: Tom Lane Date: Sat, 18 May 2019 21:34:13 +0000 (-0400) Subject: Use "make test" not "make check" to run test cases. X-Git-Tag: REL_2_1_1~7 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=c34fe57715d68364f22240d97bb3fb6b668be29d;p=pg_bsd_indent.git Use "make test" not "make check" to run test cases. The "check" rules brought in by pgxs.mk conflict with this, and produce annoying warnings, so just change the target name. --- diff --git a/Makefile b/Makefile index 8c5ff6e..ee046f3 100644 --- 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. diff --git a/README.pg_bsd_indent b/README.pg_bsd_indent index 747130d..85c3dca 100644 --- a/README.pg_bsd_indent +++ b/README.pg_bsd_indent @@ -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?)