check installcheck installcheck-parallel:
$(MAKE) -C src/test $@
-# TODO: add contrib
-$(call recurse,check-world,src/test src/pl src/interfaces/ecpg,check)
+$(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib,check)
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
installcheck: submake
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
-# in-tree test doesn't work yet (no way to install my shared library)
-#check: all submake
-# $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
+ifdef PGXS
check:
- @echo "'make check' is not supported."
- @echo "Do 'make install', then 'make installcheck' instead."
- @exit 1
+ @echo '"$(MAKE) check" is not supported.'
+ @echo 'Do "$(MAKE) install", then "$(MAKE) installcheck" instead.'
+else
+check: all submake
+ $(pg_regress_check) --extra-install=$(subdir) $(REGRESS_OPTS) $(REGRESS)
+endif
endif # REGRESS
static char *dlpath = PKGLIBDIR;
static char *user = NULL;
static _stringlist *extraroles = NULL;
+static _stringlist *extra_install = NULL;
/* internal variables */
static const char *progname;
printf(_(" --top-builddir=DIR (relative) path to top level build directory\n"));
printf(_(" --port=PORT start postmaster on PORT\n"));
printf(_(" --temp-config=PATH append contents of PATH to temporary config\n"));
+ printf(_(" --extra-install=DIR additional directory to install (e.g., contrib\n"));
printf(_("\n"));
printf(_("Options for using an existing installation:\n"));
printf(_(" --host=HOST use postmaster running on HOST\n"));
{"use-existing", no_argument, NULL, 20},
{"launcher", required_argument, NULL, 21},
{"load-extension", required_argument, NULL, 22},
+ {"extra-install", required_argument, NULL, 23},
{NULL, 0, NULL, 0}
};
case 22:
add_stringlist_item(&loadextension, optarg);
break;
+ case 23:
+ add_stringlist_item(&extra_install, optarg);
+ break;
default:
/* getopt_long already emitted a complaint */
fprintf(stderr, _("\nTry \"%s -h\" for more information.\n"),
if (temp_install)
{
FILE *pg_conf;
+ _stringlist *sl;
/*
* Prepare the temp installation
exit_nicely(2);
}
+ for (sl = extra_install; sl != NULL; sl = sl->next)
+ {
+#ifndef WIN32_ONLY_COMPILER
+ snprintf(buf, sizeof(buf),
+ SYSTEMQUOTE "\"%s\" -C \"%s/%s\" DESTDIR=\"%s/install\" install >> \"%s/log/install.log\" 2>&1" SYSTEMQUOTE,
+ makeprog, top_builddir, sl->str, temp_install, outputdir);
+#else
+ fprintf(stderr, _("\n%s: --extra-install option not supported on this platform\n", progname));
+ exit_nicely(2);
+#endif
+
+ if (system(buf))
+ {
+ fprintf(stderr, _("\n%s: installation failed\nExamine %s/log/install.log for the reason.\nCommand was: %s\n"), progname, outputdir, buf);
+ exit_nicely(2);
+ }
+ }
+
/* initdb */
header(_("initializing database system"));
snprintf(buf, sizeof(buf),