From d58e8adf008d77ab40aee8fd625591dc2925da72 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Thu, 9 Apr 2020 12:57:41 +0800 Subject: [PATCH 4/4] Make the dummy 'check' target in PGXS makefiles optional Allow extensions to provide their own 'check' target without getting warnings by defining the new special variable NO_DUMMY_CHECK_TARGET. This lets extensions avoid a spurious warning about overriding the existing target. --- src/makefiles/pgxs.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index 271e7eaba8..f6231d7701 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -51,6 +51,10 @@ # ISOLATION_OPTS -- additional switches to pass to pg_isolation_regress # NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if # tests require special configuration, or don't use pg_regress +# NO_DUMMY_CHECK_TARGET -- don't define a dummy 'check' target that +# directs the user to installcheck. Useful if the extension can provide a +# useful "make check" that doesn't need to target an existing running +# PostgreSQL instance. # EXTRA_CLEAN -- extra files to remove in 'make clean' # PG_CPPFLAGS -- will be prepended to CPPFLAGS # PG_CFLAGS -- will be appended to CFLAGS @@ -429,9 +433,11 @@ endif # NO_INSTALLCHECK # Runs independently of any installation ifdef PGXS +ifndef NO_DUMMY_CHECK_TARGET check: @echo '"$(MAKE) check" is not supported.' @echo 'Do "$(MAKE) install", then "$(MAKE) installcheck" instead.' +endif else check: submake $(REGRESS_PREP) ifdef REGRESS -- 2.25.1